You are here: Home / Topics / Search / c programming
Showing 12 Search Results for : c programming

Differentiate between the macros and the functions

Filed under: C Programming on 2022-07-16 16:40:48
The differences between macros and functions can be explained as follows:MacrosFunctionsIt is preprocessed rather than compiled.It is compiled not preprocessed.It is preprocessed rather than compiled.Function checks for compilation errors.Code length is increased.Code length remains the same.Macros 

How to call a function before main() in C programming?

Filed under: C Programming on 2022-07-16 16:39:34
To call a function before the main(), pragma startup directive should be used. E.g.-#pragma startup fun
void fun()
printf("In fun\n");
printf("In main\n");
}The output of the above program will beIn funIn mainThis pragma directive, on the other hand, is compiler-dependent. This 

What are the features of the C language?

Filed under: C Programming on 2022-07-16 16:36:54
Some features of the C language are- It is Simple And Efficient. C language is portable or Machine Independent.C is a mid-level Programming Language. It is a structured Programming Language.It has a function-rich library. Dynamic Memory Management.C is super fast.We can use point

Why do we need to define any variable in a program?

Filed under: C Programming on 2022-07-05 21:42:03
The variable definition in C language tells the compiler about how much storage it should be creating for the given variable and where it should create the storage. Basically, the variable definition helps in specifying the data type. It contains a list of one variable or multiple ones as follows:ty

Why do we declare a variable in a program?

Filed under: C Programming on 2022-07-05 21:40:37
Declaring a variable provides the compiler with an assurance that there is a variable that exists with that very given name. This way, the compiler will get a signal to proceed with the further compilation without needing the complete details regarding that variable.The declaration of variables is u

Classification of Variables in C

Filed under: C Programming on 2022-07-05 21:37:02
The variables can be of the following basic types, based on the name and the type of the variableGlobal Variable: A variable that gets declared outside a block or a function is known as a global variable. Any function in a program is capable of changing the value of a global variable. It means that 

Rules for Naming a Variable in C

Filed under: C Programming on 2022-07-05 21:24:23
Here are the rules that we must follow when naming it:1. The name of the variable must not begin with a digit.2. A variable name can consist of digits, alphabets, and even special symbols such as an underscore ( _ ).3. A variable name must not have any keywords, for instance, float, int, etc.4. Ther

The Disadvantages of Recursion Processes in C

Filed under: C Programming on 2022-07-04 11:27:24
When you are using Recursion in C programming, you have to face some issues. Following are the disadvantage of using recursion in C Programming.Any recursive program is generally much slower than any non-recursive program. It is because the recursive programs have to make the function calls. Thus, i

When Does the Recursion Occur in C?

Filed under: C Programming on 2022-07-04 11:23:59
The recursion process in C refers to the process in which the program repeats a certain section of code in a similar way. In C Programming if a function calls itself from inside the same function is called recursion. The function which calls itself is called a recursive function and the function cal