Difference Between malloc() and calloc()
calloc malloc We need to split and pass the memory we want We can pass how much memory we want. Ex: p=calloc(5,sizeof(int)...
What is constant and variable in C ?
Constant A constant is a value or identifier whose value is fixed and does not change, in the entire program. Constant is...
What is Dynamic data structure ?
We need a dynamic data structure to data efficiently into memory. Memory spaces in a program can be accessed using dynamic...
What are the types of data types in C ?
C language supports 3 data types: Primary Data Types User Defined Data Types Secondary Data Types Primary Data Types:...
What do you mean by Data Type in C ?
Data type is type of the value that a variable can store. Each variable has its own data type and each data type occcupies...
Difference between getc(), getchar(), getch() and getche()
getc() This function gets single character as input and returns an integer value. If this fails, it returns EOF. Syntax of...
What is the difference between puts() and printf() ?
Printf() Puts() Declared in the header file stdio.h Declared in the header file stdio.h Function to print a formatted string...
What is l-value and r-value in C ?
L Value L value or locator value represents an object that occupies some identifiable location in memory. In an assignment...
What is a header file in C ? What will happen if we include a header file twice in a C program ?
Header files store the definitions and rules for different built-in functions in the C program. For example, printf(),...
Explain break and continue statements with examples
Break This statement is used with switch statement. Can also be used with while loop, do – while loop and for loop. When the...
What is dangling Pointer in c ?
The most common bugs related to pointer & memory management is called dangling or wild pointers. Sometimes programmer...
What are called and calling functions ?
A function call is very important in programming. When we need to call a function, it is called inside a program. A function...
How many types of data type in C Language ?
C language supports 3 data types: Primary Data Types User Defined Data Types Secondary Data Types Primary Data Types Integer...
What is the use of printf() and scanf() functions ?
Scanf() Scanf() is the most commonly used in C langauage. They are inbuilt functions in the c program which is in the...
What is While Loop in C Language with example ?
While loop evaluates the conditions inside the brackets. If the condition returns true, the statements inside the while loop...
Explain IF-Else Statement in C Language ?
If statement in C is known as a decision-making statement. It makes a decision based on the condition given. It is followed...
What is recursion in C ?
Recursion is a process that happens when a function calls a copy of itself to work on any smaller problem. Any function that...
What is Switch Statement in C with example ?
Switch statement is an alternative to if else ladder statement which allows us to execute multiple operations for different...
What is Static Variable in C ?
Static variable have a property of preserving their value even after they are out of their scope. Static variable preserve...
What is Pointer in C ?
For storing the address of another variable pointers can be used. Variables of type int,char, array, function or any other...