Table of Contents
C Language Interview Questions
🔒 Please log in to unlock this course.
Related Questions
Question 1
Differentiate Source Codes from Object Codes
Locked. Enroll to open this question.
Question 2
What is the significance of an algorithm to C programming?
Locked. Enroll to open this question.
Question 3
Is it possible to create your own header files?
Locked. Enroll to open this question.
Question 4
What is C language?
Locked. Enroll to open this question.
Question 5
Who developed C language?
Locked. Enroll to open this question.
Question 6
Describe about history of C programming language.
Locked. Enroll to open this question.
Question 7
Who is the founder of C language?
Locked. Enroll to open this question.
Question 8
What are the different file extensions involved when programming in C?
Locked. Enroll to open this question.
Question 9
Where is C programming language used or uses of C language?
Locked. Enroll to open this question.
Question 10
What is the difference between top down approach and bottom up approach in programming languages?
Locked. Enroll to open this question.
Question 11
C language has been developed in which language?
Locked. Enroll to open this question.
Question 12
Which year C language is developed?
Locked. Enroll to open this question.
Question 13
What is meant by programming language and give some examples?
Locked. Enroll to open this question.
Question 14
Describe about C standards.
Locked. Enroll to open this question.
Question 15
What is embedded C?
Locked. Enroll to open this question.
Question 16
What is the difference between structured oriented, object-oriented and non-structure oriented…
Locked. Enroll to open this question.
Question 17
What is meant by protocol?
Locked. Enroll to open this question.
Question 18
List out some of C compilers.
Locked. Enroll to open this question.
Question 19
Is C language case sensitive?
Locked. Enroll to open this question.
Question 20
Why is C known as a mother language?
Locked. Enroll to open this question.
Question 21
Why is C called a mid-level programming language?
Locked. Enroll to open this question.
Question 22
What is command line argument?
Locked. Enroll to open this question.
Question 23
What is the acronym for ANSI?
Locked. Enroll to open this question.
Question 24
Who is the main contributor in designing the C language after Dennis Ritchie?
Locked. Enroll to open this question.
Question 25
Why is C considered a foundational programming language?
Locked. Enroll to open this question.
Question 26
What makes C faster compared to other languages?
Locked. Enroll to open this question.
Question 27
Why is C still used today even after the rise of modern languages?
Locked. Enroll to open this question.
Question 28
How does learning C help in understanding computer memory?
Locked. Enroll to open this question.
Question 29
Why is C often called a middle-level language?
Locked. Enroll to open this question.
Question 30
What are some popular applications built using C?
Locked. Enroll to open this question.
Question 31
Why is C preferred for system-level programming?
Locked. Enroll to open this question.
Question 32
How does C give programmers better control over hardware?
Locked. Enroll to open this question.
Question 33
Why is C commonly used in embedded systems?
Locked. Enroll to open this question.
Question 34
What makes C suitable for writing operating systems?
Locked. Enroll to open this question.
Question 35
How does C help programmers understand how compilers and memory management work?
Locked. Enroll to open this question.
Question 36
What advantages does C provide in terms of performance and optimization?
Locked. Enroll to open this question.
Question 37
Why is C used for building compilers and interpreters?
Locked. Enroll to open this question.
Question 38
Why do modern languages have components written in C?
Locked. Enroll to open this question.
Question 39
How does pointer usage in C give an advantage?
Locked. Enroll to open this question.
Question 40
How does C allow fine-grained control over memory allocation?
Locked. Enroll to open this question.
Question 41
Why do developers prefer C for creating high-performance libraries?
Locked. Enroll to open this question.
Question 42
How does C influence the design of modern programming languages?
Locked. Enroll to open this question.
Question 43
Why is C favored in industries like robotics, IoT, and automotive?
Locked. Enroll to open this question.
Question 44
How does the portability of C programs contribute to its relevance?
Locked. Enroll to open this question.
Question 45
Why is C used for real-time system development?
Locked. Enroll to open this question.
Question 46
Explain how C supports low-level operations better than high-level languages.
Locked. Enroll to open this question.
Question 47
Why choose C over Python or Java for microcontroller firmware?
Locked. Enroll to open this question.
Question 48
Your project requires maximum speed and minimal memory consumption. How does C help?
Locked. Enroll to open this question.
Question 49
You need to interact with hardware registers. Why use C?
Locked. Enroll to open this question.
Question 50
When would C NOT be the best choice?
Locked. Enroll to open this question.
Question 51
How does learning C make it easier to learn other programming languages?
Locked. Enroll to open this question.
Question 52
Why did you choose to learn C programming?
Locked. Enroll to open this question.
Question 53
How has learning C improved your problem-solving skills?
Locked. Enroll to open this question.
Question 54
What is one advantage of C that will keep it relevant for the next 20 years?
Locked. Enroll to open this question.
Question 55
Which level is C language belonging to?
Locked. Enroll to open this question.
Question 56
What do you mean by high level, middle level and low level languages and give an example for each?
Locked. Enroll to open this question.
Question 57
What is a compiler?
Locked. Enroll to open this question.
Question 58
What is the difference between assembler, compiler and interpreter?
Locked. Enroll to open this question.
Question 59
Why is C language being considered a middle level language?
Locked. Enroll to open this question.
Question 60
What are the key features of C language or what are the characteristics of C language?
Locked. Enroll to open this question.
Question 61
What are the features of the C language?
Locked. Enroll to open this question.
Question 62
What is the difference between C and C++?
Locked. Enroll to open this question.
Question 63
What is the difference between C and Java?
Locked. Enroll to open this question.
Question 64
What are main characteristics of C language?
Locked. Enroll to open this question.
Question 65
What is printf()?
Locked. Enroll to open this question.
Question 66
What is scanf()?
Locked. Enroll to open this question.
Question 67
Execution of a C program starts from which function?
Locked. Enroll to open this question.
Question 68
What is IDE?
Locked. Enroll to open this question.
Question 69
What is header file in C language?
Locked. Enroll to open this question.
Question 70
What is void in C?
Locked. Enroll to open this question.
Question 71
What is the syntax for comments in C?
Locked. Enroll to open this question.
Question 72
What is the difference between getch() and getche()?
Locked. Enroll to open this question.
Question 73
Write a program to print hello world
Locked. Enroll to open this question.
Question 74
Which compiler switch to be used for compiling the programs using math library with gcc compiler?
Locked. Enroll to open this question.
Question 75
Can the curly brackets { } be used to enclose a single line of code?
Locked. Enroll to open this question.
Question 76
What are header files and what are its uses in C programming?
Locked. Enroll to open this question.
Question 77
What is syntax error?
Locked. Enroll to open this question.
Question 78
Can two or more operators such as and be combined in a single line of program code?
Locked. Enroll to open this question.
Question 79
Why is it that not all header files are declared in every C program?
Locked. Enroll to open this question.
Question 80
What are compound statements?
Locked. Enroll to open this question.
Question 81
What is wrong in this statement? scanf("%d",whatnumber);
Locked. Enroll to open this question.
Question 82
What are comments and how do you insert it in a C program?
Locked. Enroll to open this question.
Question 83
What are reserved words?
Locked. Enroll to open this question.
Question 84
Not all reserved words are written in lowercase. TRUE or FALSE?
Locked. Enroll to open this question.
Question 85
What are run-time errors?
Locked. Enroll to open this question.
Question 86
What is the difference between functions abs() and fabs()?
Locked. Enroll to open this question.
Question 87
What is the general form of a C program?
Locked. Enroll to open this question.
Question 88
What is the use of a semicolon (;) at the end of every program statement?
Locked. Enroll to open this question.
Question 89
What are all the sections that a C program may have and must have?
Locked. Enroll to open this question.
Question 90
What is the use of printf() and scanf() functions?
Locked. Enroll to open this question.
Question 91
Can we compile a program without main() function?
Locked. Enroll to open this question.
Question 92
What is a token?
Locked. Enroll to open this question.
Question 93
What is token in C?
Locked. Enroll to open this question.
Question 94
What are the types of C tokens?
Locked. Enroll to open this question.
Question 95
What is a token?
Locked. Enroll to open this question.
Question 96
What is the newline escape sequence?
Locked. Enroll to open this question.
Question 97
What is the purpose of the keyword typedef?
Locked. Enroll to open this question.
Question 98
Which key word is used to perform unconditional branching?
Locked. Enroll to open this question.
Question 99
When is the "void" keyword used in a function?
Locked. Enroll to open this question.
Question 100
What is Standard Header Files ?
Locked. Enroll to open this question.
Question 101
What is keyword in C?
Locked. Enroll to open this question.
Question 102
List out some keywords available in C language.
Locked. Enroll to open this question.
Question 103
What is the maximum length of an identifier?
Locked. Enroll to open this question.
Question 104
What is identifier in C?
Locked. Enroll to open this question.
Question 105
What are format specifiers in C?
Locked. Enroll to open this question.
Question 106
What are Format Specifiers in C and why are they important?
Locked. Enroll to open this question.
Question 107
What is the syntax and structure of Format Specifiers in C?
Locked. Enroll to open this question.
Question 108
What are the most commonly used Format Specifiers in C?
Locked. Enroll to open this question.
Question 109
How are Format Specifiers used in printf() function?
Locked. Enroll to open this question.
Question 110
How are Format Specifiers used in scanf() function?
Locked. Enroll to open this question.
Question 111
Describe the history of C programming language.
Locked. Enroll to open this question.
Question 112
When was C language developed?
Locked. Enroll to open this question.
Question 113
Can I use "int" data type to store the value 32768? Why?
Locked. Enroll to open this question.
Question 114
Where is the auto variables stored?
Locked. Enroll to open this question.
Question 115
Can we specify variable field width in a scanf() format string? If possible how?
Locked. Enroll to open this question.
Question 116
What are global variables and how do you declare them?
Locked. Enroll to open this question.
Question 117
What is Variable Declaration ?
Locked. Enroll to open this question.
Question 118
What is variable in C?
Locked. Enroll to open this question.
Question 119
What is the difference between constant and variable in C?
Locked. Enroll to open this question.
Question 120
Can variable name start with numbers?
Locked. Enroll to open this question.
Question 121
What is the difference between variable declaration and variable definition in C?
Locked. Enroll to open this question.
Question 122
What are the different types of variable in C?
Locked. Enroll to open this question.
Question 123
Invalid Variable Names and Reasons
Locked. Enroll to open this question.
Question 124
Errors in C Statements
Locked. Enroll to open this question.
Question 125
What is the difference between variable declaration and variable definition? ( in a line)
Locked. Enroll to open this question.
Question 126
What is variable initialization and why is it important?
Locked. Enroll to open this question.
Question 127
What is wrong with this program statement? void = 10;
Locked. Enroll to open this question.
Question 128
Is this program statement valid? INT = 10.50;
Locked. Enroll to open this question.
Question 129
Where an automatic variable is stored?
Locked. Enroll to open this question.
Question 130
What is Blocks and Scope in c ?
Locked. Enroll to open this question.
Question 131
What is Variable Storage Classes?
Locked. Enroll to open this question.
Question 132
What is local variable in C?
Locked. Enroll to open this question.
Question 133
What does static variable mean?
Locked. Enroll to open this question.
Question 134
What is the use of a static variable in C?
Locked. Enroll to open this question.
Question 135
What is static memory allocation?
Locked. Enroll to open this question.
Question 136
What is an auto keyword in C?
Locked. Enroll to open this question.
Question 137
What is global variable in C?
Locked. Enroll to open this question.
Question 138
What is the difference between the local variable and global variable in C?
Locked. Enroll to open this question.
Question 139
What is storage class? What are the different storage classes in C?
Locked. Enroll to open this question.
Question 140
What is environment variable in C?
Locked. Enroll to open this question.
Question 141
What is the difference between auto variable and register variable in C?
Locked. Enroll to open this question.
Question 142
What is the difference between auto variable and static variable in C?
Locked. Enroll to open this question.
Question 143
What is l-value and r-value?
Locked. Enroll to open this question.
Question 144
What are variables and it what way is it different from constants?
Locked. Enroll to open this question.
Question 145
What is constant in C?
Locked. Enroll to open this question.
Question 146
What are the types of constants in C?
Locked. Enroll to open this question.
Question 147
What is the difference between a variable and a constant in C programming?
Locked. Enroll to open this question.
Question 148
What are enumerations?
Locked. Enroll to open this question.
Question 149
Explain the use of comma operator (,).
Locked. Enroll to open this question.
Question 150
Describe the order of precedence with regards to operators in C.
Locked. Enroll to open this question.
Question 151
What are enumerated types?
Locked. Enroll to open this question.
Question 152
What is enum in C?
Locked. Enroll to open this question.
Question 153
What is operator in C?
Locked. Enroll to open this question.
Question 154
What are the different types of operator in C?
Locked. Enroll to open this question.
Question 155
What is & and * operators in C?
Locked. Enroll to open this question.
Question 156
What value will be assigned to the variable X if a = 10, b = 20, c = 30, d = 40 for the expression…
Locked. Enroll to open this question.
Question 157
What is the value assigned to the following variables? int X1 = 13/3; int X2 = 13%3;
Locked. Enroll to open this question.
Question 158
Evaluation of Expressions and Hierarchy
Locked. Enroll to open this question.
Question 159
Conversion of Equations into C Statements
Locked. Enroll to open this question.
Question 160
S++ or S = S+1, which can be recommended to increment the value by 1 and why?
Locked. Enroll to open this question.
Question 161
Where the address of operator (&) cannot be used for?
Locked. Enroll to open this question.
Question 162
What is reminder for 5.0 % 2?
Locked. Enroll to open this question.
Question 163
How do you construct an increment statement or decrement statement in C?
Locked. Enroll to open this question.
Question 164
What is the modulus operator?
Locked. Enroll to open this question.
Question 165
What is arithmetic operator in C?
Locked. Enroll to open this question.
Question 166
What is the difference between the expression "++a" and "a++"?
Locked. Enroll to open this question.
Question 167
What is the relational operator in C?
Locked. Enroll to open this question.
Question 168
What does the && operator do in a program code?
Locked. Enroll to open this question.
Question 169
What is the bitwise operator in C?
Locked. Enroll to open this question.
Question 170
What is || operator and how does it function in a program?
Locked. Enroll to open this question.
Question 171
What is the logical operator in C?
Locked. Enroll to open this question.
Question 172
What is the difference between the = symbol and == symbol?
Locked. Enroll to open this question.
Question 173
What is assignment operator in C?
Locked. Enroll to open this question.
Question 174
What is the difference between pre increment operator and post increment operator?
Locked. Enroll to open this question.
Question 175
What is the difference between pre decrement operator and post decrement operator?
Locked. Enroll to open this question.
Question 176
How many operators are there under the category of ternary operators?
Locked. Enroll to open this question.
Question 177
What is the use of a ? character?
Locked. Enroll to open this question.
Question 178
Which of the following operators is incorrect and why? ( >=,
Locked. Enroll to open this question.
Question 179
What is the syntax for ternary operator in C?
Locked. Enroll to open this question.
Question 180
What is the use of sizeof() function in C?
Locked. Enroll to open this question.
Question 181
What are all decision control statements in C?
Locked. Enroll to open this question.
Question 182
How will you print numbers from 1 to 100 without using a loop?
Locked. Enroll to open this question.
Question 183
What is an endless loop?
Locked. Enroll to open this question.
Question 184
What are all loop control statements in C?
Locked. Enroll to open this question.
Question 185
What is an infinite loop?
Locked. Enroll to open this question.
Question 186
What is the difference between while and do-while loops in C and Java?
Locked. Enroll to open this question.
Question 187
Differentiate between for loop and a while loop? What are its uses?
Locked. Enroll to open this question.
Question 188
Explain the syntax for for loop.
Locked. Enroll to open this question.
Question 189
What is a nested loop?
Locked. Enroll to open this question.
Question 190
Write a loop statement that will show the following output:112123123412345
Locked. Enroll to open this question.
Question 191
What are the different types of control structures in programming?
Locked. Enroll to open this question.
Question 192
What is the use of goto statement?
Locked. Enroll to open this question.
Question 193
What is the meaning of base address of the array?
Locked. Enroll to open this question.
Question 194
How do you access the values within an array?
Locked. Enroll to open this question.
Question 195
What is the advantage of an array over individual variables?
Locked. Enroll to open this question.
Question 196
Describe how arrays can be passed to a user defined function
Locked. Enroll to open this question.
Question 197
What is the right way to Initialize array?
Locked. Enroll to open this question.
Question 198
Can array subscripts have negative value in C?
Locked. Enroll to open this question.
Question 199
What is an array in C?
Locked. Enroll to open this question.
Question 200
Difference between arrays and linked list?
Locked. Enroll to open this question.
Question 201
What are multidimensional arrays?
Locked. Enroll to open this question.
Question 202
How do you declare a variable that will hold string values?
Locked. Enroll to open this question.
Question 203
What is wrong with this statement? myName = "Nurujjaman";
Locked. Enroll to open this question.
Question 204
How do you determine the length of a string value that was stored in a variable?
Locked. Enroll to open this question.
Question 205
How do you convert strings to numbers in C?
Locked. Enroll to open this question.
Question 206
What is the difference between memcpy() and memmove() functions in C?
Locked. Enroll to open this question.
Question 207
What is the difference between strcpy() and strncpy() functions in C?
Locked. Enroll to open this question.
Question 208
What is the difference between array and string in C?
Locked. Enroll to open this question.
Question 209
Explain the use of %i format specifier w.r.t scanf().
Locked. Enroll to open this question.
Question 210
How can you print a (backslash) using any of the printf() family of functions.
Locked. Enroll to open this question.
Question 211
What is a static function?
Locked. Enroll to open this question.
Question 212
How do you generate random numbers in C?
Locked. Enroll to open this question.
Question 213
What could possibly be the problem if a valid function name such as tolower() is being reported by…
Locked. Enroll to open this question.
Question 214
What are actual arguments?
Locked. Enroll to open this question.
Question 215
What does the function toupper() do?
Locked. Enroll to open this question.
Question 216
Is it possible to have a function as a parameter in another function?
Locked. Enroll to open this question.
Question 217
What is the difference between functions getch() and getche()?
Locked. Enroll to open this question.
Question 218
Can you pass an entire structure to functions?
Locked. Enroll to open this question.
Question 219
What is gets() function?
Locked. Enroll to open this question.
Question 220
How do you search data in a data file using random access method?
Locked. Enroll to open this question.
Question 221
Is there a built-in function in C that can be used for sorting data?
Locked. Enroll to open this question.
Question 222
What is the use of the function in C?
Locked. Enroll to open this question.
Question 223
What is function prototype?
Locked. Enroll to open this question.
Question 224
What are static functions? What is their use?
Locked. Enroll to open this question.
Question 225
What are the different ways of passing parameters to the functions? Which to use when?
Locked. Enroll to open this question.
Question 226
What is the difference between Call by Value and Call by Reference? C Language
Locked. Enroll to open this question.
Question 227
Example of call by value in C Program
Locked. Enroll to open this question.
Question 228
Out of fgets() and gets() which function is safe to use and why?
Locked. Enroll to open this question.
Question 229
Difference between strdup and strcpy?
Locked. Enroll to open this question.
Question 230
Where should type cast function not be used in C?
Locked. Enroll to open this question.
Question 231
What is static function in C?
Locked. Enroll to open this question.
Question 232
If you want to execute C program even after main function is terminated, which function can be used?
Locked. Enroll to open this question.
Question 233
Is it possible to call atexit() function more than once in a C program?
Locked. Enroll to open this question.
Question 234
What is exit() function in C?
Locked. Enroll to open this question.
Question 235
What is the difference between exit() and return() in C?
Locked. Enroll to open this question.
Question 236
Is there any inbuilt library function in C to remove leading and trailing spaces from a string? How…
Locked. Enroll to open this question.
Question 237
What is the difference between Strings and Arrays?
Locked. Enroll to open this question.
Question 238
What are command line arguments?
Locked. Enroll to open this question.
Question 239
What is the difference between memcpy() and strcpy() functions in C?
Locked. Enroll to open this question.
Question 240
Which function in C can be used to append a string to another string?
Locked. Enroll to open this question.
Question 241
What is the purpose of built-in stricmp() function.
Locked. Enroll to open this question.
Question 242
What is recursion?
Locked. Enroll to open this question.
Question 243
What is recursion in C?
Locked. Enroll to open this question.
Question 244
What is a dangling pointer? in one line
Locked. Enroll to open this question.
Question 245
What is a NULL statement?
Locked. Enroll to open this question.
Question 246
What are pointers?
Locked. Enroll to open this question.
Question 247
What is file pointer in C?
Locked. Enroll to open this question.
Question 248
When can void pointer and null pointer be used in C?
Locked. Enroll to open this question.
Question 249
What is const pointer in C?
Locked. Enroll to open this question.
Question 250
What is the usage of the pointer in C?
Locked. Enroll to open this question.
Question 251
What is pointer to pointer in C?
Locked. Enroll to open this question.
Question 252
What is Dangling pointer?
Locked. Enroll to open this question.
Question 253
What is a pointer to a function? Give the general syntax for the same.
Locked. Enroll to open this question.
Question 254
What is the advantage of declaring void pointers?
Locked. Enroll to open this question.
Question 255
When to user -> (arrow) operator.
Locked. Enroll to open this question.
Question 256
What is the difference between call by value and call by reference in C?
Locked. Enroll to open this question.
Question 257
Example of call by reference in C Program
Locked. Enroll to open this question.
Question 258
What is a self-referential structure?
Locked. Enroll to open this question.
Question 259
What are bit fields?
Locked. Enroll to open this question.
Question 260
What are structure types in C?
Locked. Enroll to open this question.
Question 261
What is the structure?
Locked. Enroll to open this question.
Question 262
What are the differences between structures and arrays?
Locked. Enroll to open this question.
Question 263
What is the use of typedef?
Locked. Enroll to open this question.
Question 264
What is a union?
Locked. Enroll to open this question.
Question 265
What are the differences between structures and union?
Locked. Enroll to open this question.
Question 266
What the advantages of using Unions?
Locked. Enroll to open this question.
Question 267
What is a union?
Locked. Enroll to open this question.
Question 268
Explain the purpose of the function sprintf().
Locked. Enroll to open this question.
Question 269
Describe the file opening mode "w+".
Locked. Enroll to open this question.
Question 270
Are comments included during the compilation stage and placed in the EXE file as well?
Locked. Enroll to open this question.
Question 271
Is FILE a built-in data type?
Locked. Enroll to open this question.
Question 272
What is a sequential access file?
Locked. Enroll to open this question.
Question 273
What does the characters "r" and "w" mean when writing programs that will make use of files?
Locked. Enroll to open this question.
Question 274
What is the difference between text files and binary files?
Locked. Enroll to open this question.
Question 275
What is the advantage of a random access file?
Locked. Enroll to open this question.
Question 276
What is the purpose of sprintf() function?
Locked. Enroll to open this question.
Question 277
What are the functions to open and close the file in C language?
Locked. Enroll to open this question.
Question 278
What are macros? What are its advantages and disadvantages?
Locked. Enroll to open this question.
Question 279
What is dynamic memory allocation?
Locked. Enroll to open this question.
Question 280
What functions are used for dynamic memory allocation in C language?
Locked. Enroll to open this question.
Question 281
Distinguish between malloc() and calloc() memory allocation.
Locked. Enroll to open this question.
Question 282
What is the difference between malloc() and calloc()?
Locked. Enroll to open this question.
Question 283
What is a preprocessor?
Locked. Enroll to open this question.
Question 284
How will you print
Locked. Enroll to open this question.
Question 285
What is Macro? Why do we use the macro?
Locked. Enroll to open this question.
Question 286
What is the use of #define in C?
Locked. Enroll to open this question.
Question 287
What is ## operator in C?
Locked. Enroll to open this question.
Question 288
What is pragma in C? Or how will you execute functions before and after main function in C program?
Locked. Enroll to open this question.
Question 289
How will you override an existing macro in C?
Locked. Enroll to open this question.
Question 290
How to check whether macro is defined or not in a C program?
Locked. Enroll to open this question.
Get C Programming Language for Problem Solving updates by email
Short, practical lessons and course updates from Rumman Ansari. No spam.