Questions

   Here we have collections of some basic questions in C programming language, do practice to understand C more detalis.

       1.      What is the library functions in C with examples?
2.      What is the difference between array and linked list?
3.      What is recursion function in C?
4.      What is the difference between static array and dynamic array in C?
5.      What is array of pointer in C ?
6.      What is pointer to pointer in C?
7.      What is string in C?
8.      How will you swap 2 variables without using third variable in C?
9.      What is operator precedence in C?
10.   What is truncation in C? When does it happen?
11.   What are the properties of structure in C?
12.   What are the size of different variables of union in C?
13.   What is self-referential structure in C?
14.   What are disadvantages of using macro in C?
15.   What is the difference between auto and register storage class in C?
16.   What is the use of bit field in C?
17.   What is the error “segmentation fault” in C?
18.   Is it possible to reduce executable file size in C and how?
19.   What is stack memory in C?
20.   What is heap memory in C?
21.   What are the different segments of RAM ?
22.   In which memory, local variables are stored in C?
23.   In which memory, malloc(), calloc() ( dynamic memory functions ) are stored in C?
24.   While passing an array to a function as an argument, what actually is passed?
25.   What is high order and low order bytes in C?
26.   What is the maximum number of arguments that can be passed to a function?
27.   What is header file in C?
28.   Do you know why is semicolon used at the end of each line in C programs?
29.   What is the difference between getc(), getch() and getchar() in C?
30.   How to change the size of an array dynamically in C?
31.   What is errno() in C?
32.   Is it possible to return more than one values from a function in C?
33.   What is function prototype in C?
34.   What is the purpose of fflush() function in C?
35.   What is the use of extern keyword in C?
36.   Can modulus operator be applied to float or double data type in C?
37.   What is the difference between normal variable and pointer variable in C?
38.   What are all different types of pointers in C?
39.   What is double pointer and what about its size ?
40.   What are all format specifiers in C? Why are they used?
41.   What is linked list?
42.   What is hashing?
43.   What is static variable? Can static variable be declared in header file in C?
44.   Is it possible to have nested include files in C?
45.   What is the difference between printf() and sprintf() functions in C?
46.   What is circular linked list?
47.   What is the difference between character array and string in C?
48.   What is the difference between char const* p and const char* p in C language?
49.   What does implicit and explicit mean in C?
50.   What is the difference between enum and #define constant in C?
51.   What is alias in C ?
52.   What are predefined macros in C language?
53.   Can a file other than header file be included in C program using #include?
54.   Is error handling done in C? What are all error handling functions in C?
55.   What is array boundary check? Is it done in C?
56.   What is null pointer assignment error in C?
57.   Can we assign null to a pointer after freeing them in C?
58.   What is page thrashing in C?
59.   Is it possible to determine the size of an allocated portion of memory for a program in C?
60.   What is sorting and list some sorting methods in C?
61.   What is searching and list some searching methods in C?
62.   When should type cast not be used in C?
63.   What is difference between function and built in function in C?
64.   What is difference between linker and linkage?
65.   Which one (nested if or switch statement) is easy to use when we have more than 2 conditional expressions in C?
66.   What is argument in C? What is the difference between actual argument and formal argument in C language?
67.   What is the difference between internal and external static variables in C?
68.   What is modular programming?
69.   What is indirection in C?
70.   What is the difference between array and pointer in C?
71.   How many ways a pointer variable can be initialized in C?
72.   What is difference between text and binary files in C?
73.   What is difference between structure and union in C?
74.   What is difference between structure and array in C?
75.   Is function declared or defined in header files in C?
76.   Where is extern, static and auto variable stored in memory?
77.   Where is register variable stored in memory?
78.   What is difference between for loop and while loop in C?
79.   Which data type a pointer variable belonging to in C?
80.   What is array of pointer or pointer array in C?
81.   Can a C program have more than one main() function?
82.   Can a structure have a pointer to itself in C?
83.   What is file in C?
84.   What are the types of files in C?
85.   What is file pointer in C?
86.   What is the difference between array of pointer and pointer to array in C?
87.   What is fopen(), fclose() in C?
88.   What is ftell in C?
89.   What is difference between constant pointer and pointer to a constant in C?
90.   Can main() function be called recursively in C?
91.   Can we compare 2 same structures in C?
92.   What is difference between syntax error and logical error in C?
93.   Is it correct to include all header files in a C program?
94.   How will you print back slash and percentage character in C?
95.   What is the difference between single and compound statements in C?
96.   Is it possible to pass entire structure to a function in C? How?
97.   Is macro better than function in C programming?
98.   Is using goto statement a best practice in C programming and why ?
99.   What is the difference between break and continue statement in C?
100.    What is the difference between gets() and fgets() in C?
101.    What is const keyword in C?
102.    What is volatile keyword in C?
103.    What is storage class specifier in C language?
104.    What are the types of storage class specifiers in C?
105.    Can all variables stored in register memory for faster access?
106.    What is auto specifier in C?
107.    What is static specifier in C?
108.    What is extern specifier in C?
109.    What is register specifier in C?
110.    What are the different types of array in C language?
111.    How are data stored in 2 dimensional arrays in C?
112.    What is string in C language?
113.    What is the difference between strcat() and strncat() functions in C?
114.    Which string function can be used to compare two strings irrespective of the case in C ?
115.    Can the content of a pointer be a string in C?
116.    What is the size of int pointer and char pointer in C?
117.    What is function in C?
118.    What is a compiler ?
119.    Why are functions used in C language?
120.    What is meant by function declaration, function call and function definition in C?
121.    How can we call a function in C program?
122.    What is call by value in C?
123.    What is call by reference in C?
124.    What is the difference between function declaration and function definition in C?
125.    Can a function be called either with or without arguments in C?
126.    When a function can return some value to the calling function in C program?
127.    When a function can’t return any value to the calling function in C program?
128.    Is it possible to return more than one value from a function in C program?
129.    What can be done if we want to return many values from a function in C program?
130.    What is library function or inbuilt function in C programming?
131.    What are the advantages of using library functions over writing our own functions in C program?
132.    What does each library function contain in C?
133.    All dynamic memory allocation functions are declared in which header file in C?
134.    What is the meaning of return 0; in main function ?
135.    What is the difference between header file and precompiled version of header file in C?
136.    What is command line argument in C?
137.    How will you pass arguments to the main function in C?
138.    What is variable length argument in C?
139.    How is variable length argument denoted in C?
140.    Variable length argument functions are declared in which header file in C?
141.    Which function is must in a C program?
142.    How many times a function can be called in a C program?
143.    Is main function necessary in compilation time in C? Or Can we compile a program without main() function in C?
144.    Can we execute a program without main() function in C?
145.    What are the types of functions in C language ?
146.    Which header file supports abs() function in C?
147.    Which library function is used to check whether character is alphanumeric or not?
148.    What is buffer manipulation function in C?
149.    Which function is used to modify system date in C?
150.    Which function is used to get current system time in C?
151.    What is dynamic memory allocation in C?
152.    What are the dynamic memory allocation functions in C?
153.    What is malloc() in C?
154.    What is calloc() in C?
155.    What is realloc() in C
156.    What is free() in C?
157.    What is the difference between malloc() and calloc() function in C?
158.    What happens if you try to allocate memory for the same pointer variable twice using malloc() function in C?
159.    What happens if you try to free the memory for the same pointer variable twice that was allocated using malloc() function in C?
160.    What is the difference between static memory allocation and dynamic memory allocation in C?
161.    What is typecasting in C?
162.    How will you convert string into integer or float in C?
163.    How will you convert integer into string in C?
164.    What is structure in C?
165.    What is member in a C structure?
166.    How can we access structure members in C?
167.    Can you copy one structure into another in C? How?
168.    What is the difference between variable, array and structure in C?
169.    What are the uses of structures in C?
170.    What is array of structure or structure array in C?
171.    Can we have more than one structure variable declared for one structure in C?
172.    What is nested structure in C?
173.    How are structure members stored in memory?
174.    What is structure padding in C?
175.    How to avoid structure padding in C?
176.    Why is structure memory size not always same as we expected?
177.    What is pre-processor directive in C?
178.    What are pre-processor, compiler, assembler, linker and loader?
179.    Can we write structure inside a union ?
180.    Can we write union or structure inside a structure ?
181.    What is the meaning of arrow (->) symbol in C ?
 
       

No comments:

Post a Comment

For any doubt or suggestion you can write here