C Language Interview Questions - C-Tutorial

Latest

Sunday, 18 June 2017

C Language Interview Questions

C Language Interview Questions
1) What is a pointer on pointer?
2) Distinguish between malloc() & calloc() memory allocation?
3) What is keyword ?
4) What are the valid places for the keyword break to appear.
5) Explain the syntax for loop?
6) What is difference between including the header file with-in angular braces < > and double quotes “ “
7) How a negative integer is stored?
8) What is a static variable?
9) What is a NULL pointer?
10) What is the purpose of extern storage specifiers?
11) Explain the purpose of the function printf().
12) What is the meaning of base address of the array?
13) When should we use the register storage specifier?
14) S++ or S = S+1, which can be recommended to increment the value by 1 and why?
15) What is a dangling pointer?
16) What is the purpose of the keyword typedef?
17) What is value and rvalue?
18) What is the difference between actual and formal parameters?
19) Can a program be compiled without main() function?
20) What is the advantage of declaring void pointers?
21) Where an automatic variable is stored?
22) What is a nested structure?
23) What is the difference between variable declaration and variable definition?
24) What is a self-referential structure?
25) Does a built-in header file contains built-in function definition?
26) Explain modular programming.
27) What is a token?
28) What is a preprocessor?
29) Explain the use of %i format specifier w.r.t scanf().
30) How can you print a \ (backslash) using any of the printf() family of functions?
31) Does a break is required by default case in switch statement?
32) When to user -> (arrow) operator.
33) What are bit fields?
34) What are command line arguments?
35) What are the different ways of passing parameters to the functions? Which to use when?
36) What is the purpose of built-in stricmp() function.
37) Describe the file opening mode “w+”.
38) Where the address of operator (&) cannot be used?
39) Is FILE a built-in data type?
40) What is reminder for 5.0 % 2?
41) How many operators are there under the category of ternary operators?
42) Which key word is used to perform unconditional branching?
43) What is a pointer to a function? Give the general syntax for the same.
44) Explain the use of comma operator (,).
45) What is a NULL statement?
46) What is a static function?
47) Which compiler switch to be used for compiling the programs using math library with gcc compiler?
48) Which operator is used to continue the definition of macro in the next line?
49) Which operator is used to receive the variable number of arguments for a function?
50) What is the problem with the following coding snippet?
51) Which built-in library function can be used to re-size the allocated dynamic memory?
52) Define an array.
53) What are enumerations?
54) Which built-in function can be used to move the file pointer internally?
55) What is a variable?
56) Who designed C programming language?
57) C is successor of which programming language?
58) What is the full form of ANSI?
59) Which operator can be used to determine the size of a data type or variable?
60) Can we assign a float variable to a long integer variable?
61) Is 068 a valid octal number?
62) What it the return value of a relational operator if it returns any?
63) How does bitwise operator XOR works.
64) What is an infinite loop?
65) Can variables belonging to different scope have same name? If so show an example.
66) What is the default value of local and global variables?
67) Can a pointer access the array?
68) What are valid operations on pointers?
69) What is a string length?
70) What is the built-in function to append one string to another?
71) Which operator can be used to access union elements if union variable is a pointer variable?
72) Explain about ‘stdin’.
73) Name a function which can be used to close the file stream.
74) What is the purpose of #undef preprocessor?
75) Define a structure.
76) Name the predefined macro which be used to determine whether your compiler is ANSI standard or not?
77) What is typecasting?
78) What is recursion?
79) Which function can be used to release the dynamic allocated memory?
80) What is the first string in the argument vector w.r.t command line arguments?
81) How can we determine whether a file is successfully opened or not using fopen() function?
82) What is the output file generated by the linker.
83) What is the maximum length of an identifier?
84) What is the default function call method?
85) Functions must and should be declared. Comment on this.
86) When the macros gets expanded?
87) Can a function return multiple values to the caller using return reserved word?
88) What is a constant pointer?
89) To make pointer generic for which date type it need to be declared?
90) Can the structure variable be initialized as soon as it is declared?
91) Is there a way to compare two structure variables?
92) Which built-in library function can be used to match a patter from the string?
93) What is difference between far and near pointers?
94) Can we nest comments in a C code?
95) Which control loop is recommended if you have to execute set of statements for fixed number of times?
96) What is a constant?

No comments:

Post a Comment