Interview Question of C Language :
This article will help you with important C Programming Interview Questions and Answers along with examples for you to crack any Interview.Most Common C Programming Interview Questions.
![]() |
Interview Question of C Language |
Q.21 What is the difference b/w structure and union?
Ans: Structure supports the multiple values simultaneously but union support only one value at a time because in structure each variable have it own memory block but in the union, a single memory block is a shard by all variable of the union.
Q.22 Who developed C Language?
Ans: Dennis Ritchie
Q.23 Difference between while loop and do-while loop?
Ans: The different b/w while and do-while loop is that in the case of while loop if the condition is wrong then its body does not execute but in the case of the do-while loop it's body executes at least one time either condition true or false.
Q.24 What is a user-defined function?
Ans :
1.The function which is made by the user is called user-defined function.
2.Its functionality is also defined by the user.
3.Example:add(),sub(),multi() etc.
Q.25 What is C Language?
Ans: It is a Basic Programming Language which is used to develop many useful things.
Q.26 What is recursion?
Ans: The process of calling a function by itself is called recursion.
Q.27 What is variable?
Ans :
1. It is the name of the storage area which is used to store data or information.
2. It always contains the last value assigned to it.
3. Each variable must be assigned a specific data type.
Q.28 What is the break statement?
Ans :
-It is a keyword that is used to transfer the control out of the body of the loop.
-In other words, we can say that it is used to terminate the execution of the loop.
-It is also used to terminate the processing of a particular case in the switch.
Q.29 Type of array?
Ans: There are to the type of array in c-
1.Single dimension array
2.Multi dimension
Q.30 What is scanf()?
Ans :
1. It is a predefined function that is used to take user input at runtime.
2. It is defined inside studio.h header file.
3.In another word, we can say that is used for taking input.
Q.31 What is Pointer?
Ans :
1. A pointer is a special variable that is used to store the address of another variable.
2.it can store the address of the same data type means an integer pointer can store the address of an integer variable, character pointer can store the address of a character variable, and so on.
3.pointer is declared with *symbol(for example int *p; here is a pointer variable).
4.&(ampersand) is used to get the address of the variable.
Q.32 Type of operator?
Ans:
⇒Arithmetic Operators
⇒Relational Operator
⇒Logical Operators
⇒Assignment Operators
⇒Bitwise Operators
⇒Increment/Decrement Operators
⇒Conditional Operators
⇒Special Operator
Q.33 What are Characteristics of C Language?
Ans :
⇒Simple
⇒Powerful
⇒Portable
⇒Machine independent
⇒Structure Oriented
⇒Middle-level Programming Language
⇒High Speed
⇒High Efficiency
⇒Flexible
Q.34 Difference b/w local and global variable?
Ans :
1. A global variable is defined outside a function but the local variable is defined inside a function.
2. A global variable can be accessed anywhere in the program but the local variables can be accessed only within a function.
Q.35 What is Enumeration?
Ans :
1. It is a collection of named integer constant means each element of enumeration is assigned by an integer value.
2. It is a user-defined datatype.
3. enum keyword is used to create an enumeration.
Q.36 What is a Local variable?
Ans:
1. The variable which is defined inside a function or block is called a local variable.
2. The scope of the local variable will be within the function or block only.
Q.37 What is a predefined function?
Ans :
1. The function which is predefined in the library is called the predefined function.
2. It is also called library function.
3. Example: printf , scanf , getch , clrscr, etc.
Q.38 How many parts of for loop?
Ans : There are three types of for loop -
1.Initialization
2.Condition
3.Increment or decrement . It is also called an update.
Q.39 What is a global variable?
Ans :
1.the variable which is defined outside a function or block is called a global variable.
2. It can be accessed anywhere in the program.
3. There is no global keyword in C to declare a global variable.
1 Comments
It is very useful , thank you
ReplyDeletePlease do not enter any spam link in the comment box