C Programming Interview Questions and Answers For Freshers Part-3
22.What is the difference between variable declaration and variable definition?
Declaration associates type to the variable whereas definition gives the value to the variable.
23.What is a self-referential structure?
A structure containing the same structure pointer variable as its element is called as self-referential structure.
24.Does a built-in header file contains built-in function definition?
No, the header file only declares function. The definition is in library which is linked by the linker.
25.Explain modular programming.
Dividing the program in to sub programs (modules/function) to achieve the given task is modular approach. More generic functions definition gives the ability to re-use the functions, such as built-in library functions.
26.What is a token?
A C program consists of various tokens and a token is either a keyword, an identifier, a constant, a string literal, or a symbol.
27.What is a preprocessor?
Preprocessor is a directive to the compiler to perform certain things before the actual compilation process begins.
28.Explain the use of %i format specifier w.r.t scanf().
Can be used to input integer in all the supported format.
29.How can you print a \ (backslash) using any of the printf() family of functions.
Escape it using \ (backslash).
30.Does a break is required by default case in switch statement?
Yes, if it is not appearing as the last case and if we do not want the control to flow to the following case after default if any.