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.1Hard

What will be the size of the following structure? struct test { char c; int i; float f; };

Q.2Hard

Which of the following correctly demonstrates pointer arithmetic?

Q.3Hard

What is the output of the following code? int a = 5; int *p = &a; int q = &p; printf("%d", q);

Q.4Hard

What is true about the variable declared as 'extern int count;' inside a function?

Q.5Hard

Consider a structure with int (4 bytes), char (1 byte), and double (8 bytes). What is the minimum size due to alignment requirements?

Q.6Hard

Which of the following statements about type qualifiers is INCORRECT?

Q.7Hard

In the declaration 'volatile int x;', what does volatile signify?

Q.8Hard

In the declaration 'int *p, q;', what are the data types?

Q.9Hard

What is the purpose of the 'restrict' keyword in modern C?

Q.10Hard

What is the difference between 'const int *p' and 'int * const p'?

Q.11Hard

What is printed by: int x = 5; printf("%d %d", x++, ++x);?

Q.12Hard

Which of the following correctly declares a constant pointer to a constant integer?

Q.13Hard

Which of the following statements about 'register' keyword is TRUE?

Q.14Hard

What is the primary purpose of the 'restrict' keyword introduced in C99?

Q.15Hard

What happens in this code: int arr[5]; int *p = &arr[0]; printf("%d", sizeof(p));

Q.16Hard

What will be the result of the following expression: float x = 0.1 + 0.2; if(x == 0.3) printf("Equal"); else printf("Not Equal");

Q.17Hard

What happens when a volatile variable is declared in a multi-threaded C program?