Home | About Us | Contact Us
Basic C language programming questions and answers which are frequantly asked in competative exams or in an company interview.
Here we have listed important questions related to c functions, operators, pointers and variables etc.
Q 1.
What is the maximum size of a float variable ?
Ans.
4 bytes
|
Q 2.
What is the range of integer data type ?
Ans.
-32768 to +32767
|
Q 3.
Which symbol is used to denote a pre-processor statement ?
Ans.
# symbol
|
Q 4.
C is a _______language.
Ans.
Middle level
|
Q 5.
______ are declared within the body of a function.
Ans.
Local variables
|
Q 6.
What is data type of FILE in C ?
Ans.
struct
|
Q 7.
Functions can return enumeration constants in C. True or False ?
Ans.
True
|
Q 8.
The address of a variable can be obtained using _____ operator.
Ans.
& operator
|
Q 9.
Which keyword is used to prevent any changes in the variable value in C ?
Ans.
const
|
Q 10.
In C language all keywords are in _______ .
Ans.
Lowered case
|
Q 11.
Who is the father of C language ?
Ans.
Dennis Ritchie
|
Q 12.
What is pre increment and post increment ?
Ans.
++i (pre increment) increments 'i' before its value is used in an assignment operation or any expression containing it. i++ (post increment) does increment after the value of 'i' is used.
|
Q 13.
What is Structure in C ?
Ans.
Structure is a user defined data type that allow us to store the collection of different data types.
|
Q 14.
Is it possible to have more than one main() function in a C program ?
Ans.
No, each program can have only one main() function.
|
Q 15.
What is the difference between formal arguments and actual arguments in c ?
Ans.
The arguments that are passed in a function call are called actual arguments.
The arguments which are mentioned in function defination are called formal arguments. |
Q 16.
What is array of pointers in c programming ?
Ans.
When all elements of an array are addresses, then it is called an array of pointers.
|
Q 17.
What is the use of realloc() in C ?
Ans.
It increases or decreases the size of dynamically allocated array.
|
Q 18.
What is a NULL Pointer ?
Ans.
Null pointer is a pointer which points to nothing.
|
Q 19.
What is Recursion in c ?
Ans.
Recursion is the process which which calls itself either directly or indirectly to work on a smaller problem.
|
Q 20.
scanf() function is used for ?
Ans.
scanf() function is used to take input from the user.
|
Q 21.
What is typedef in C explain with example ?
Ans.
typedef is a reserved keyword, With the help of this, you can give meaningful name to the existing variable in C program.
syntax: typedef unsigned int length; |
Q 22.
What is static identifier ?
Ans.
The static identifier is used for initializing only once, and the value will retains during the whole program.
|
Q 23.
What is difference between pass by value & pass by reference in C ?
Ans.
In a pass by value, the parameter value copies to another variable while, in a pass by reference, the actual parameter passes to the function.
|
Q 24.
What is the advantage of using Macros ?
Ans.
It reduces the time taken for control transfer as in case of function.
|
Q 25.
What is the use of calloc() function ?
Ans.
The calloc() function in C is used to allocate a specified amount of memory and then initialize it to zero.
|
Q 26.
What is the use of malloc () in C languge ?
Ans.
malloc() function is used to dynamically allocate a single large block of memory with the specified size.
|
Q 27.
In header files whether functions are declared or defined ?
Ans.
Functions are declared in header file.
|
Q 28.
What is a pointer ?
Ans.
Pointers are variables which stores the address of another variable.
|
Q 29.
In C language Local Variables belong to which type of Linkage ?
Ans.
No linkage type
|
Q 30.
What are the types of linkages used in C language ?
Ans.
There are 3 types of linkage: external linkage , internal linkage and no linkage.
|