iGET

C Programming - MCQ Practice Questions

Practice free C Programming multiple-choice questions with detailed answers and explanations. Perfect for competitive exam preparation.

978 questions | 100% Free

Q.1Medium

Which of the following is NOT a valid C keyword?

Q.2Medium

Which of the following is the correct way to define a constant in C?

Q.3Medium

What is the return type of strlen() function?

Q.4Medium

Consider: void func(int *p); Which statement is correct about this function declaration?

Q.5Medium

What will happen if we try to modify a const variable in C?

Q.6Medium

Which of the following correctly represents a character constant in C?

Q.7Medium

What is the output of: printf("%f", );

Q.8Medium

What is the size of the following structure in bytes (assuming 32-bit system)? struct Point { char c; int x; double d; }

Q.9Medium

What will be printed by the following code? #include <stdio.h> int main() { float f = 0.1 + 0.2; if(f == 0.3) printf("Equal"); else printf("Not Equal"); return 0; }

Q.10Medium

What will be the output of the following code? #include <stdio.h> int main() { int x = 10, y = 20; int *p = &x, *q = &y; *p = *q; printf("%d %d", x, y); return 0; }

Q.11Medium

What is the output of the following code? #include <stdio.h> int main() { int a = 5, b = 10; a = b++; printf("%d %d", a, b); return 0; }

Q.12Medium

Which of the following is NOT a valid data type modifier in C?

Q.13Medium

Which memory segment stores global variables in C?

Q.14Medium

In C, what is the purpose of the 'static' keyword when used with a global variable?

Q.15Medium

What is the range of values for 'signed char' in C (assuming 8-bit char)?

Q.16Medium

What will be the output of the expression: in C (considering integer division)?

Q.17Medium

Which of the following correctly represents a string literal in C?

Q.18Medium

What is the primary purpose of the 'volatile' keyword in C?

Q.19Medium

What does the 'const' keyword do when applied to a pointer?

Q.20Medium

Which of the following is a correct way to read a string from user input avoiding buffer overflow?