You are here: Home / Topics / Search / C Programming
Showing 12 Search Results for : C Programming

Differentiate between the macros and the functions

By Manisha Agrawal on 16 Jul 22 | Filed under: C Programming
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?

By Manisha Agrawal on 16 Jul 22 | Filed under: C Programming
To call a function before the main(), pragma startup directive should be used. E.g.-#pragma startup fun
void fun()
{
printf("In fun\n");
}
main()
{
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?

By Manisha Agrawal on 16 Jul 22 | Filed under: C Programming
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?

By Parvesh Kanani on 05 Jul 22 | Filed under: C Programming
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?

By Parvesh Kanani on 05 Jul 22 | Filed under: C Programming
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

By Parvesh Kanani on 05 Jul 22 | Filed under: C Programming
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

By Parvesh Kanani on 05 Jul 22 | Filed under: C Programming
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

By Babita on 04 Jul 22 | Filed under: C Programming
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?

By Babita on 04 Jul 22 | Filed under: C Programming
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  ......