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

Which of the following correctly demonstrates pointer arithmetic?

Q.22Hard

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

Q.23Hard

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

Q.24Hard

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

Q.25Hard

Which of the following statements about type qualifiers is INCORRECT?

Q.26Hard

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

Q.27Hard

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

Q.28Hard

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

Q.29Hard

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

Q.30Hard

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

Q.31Hard

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

Q.32Hard

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

Q.33Hard

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

Q.34Hard

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

Q.35Hard

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

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

Q.37Hard

What is the output of this program? for (int i = 1; i <= 3; i++) for (int j = 1; j <= 2; j++) printf("%d", i*j); printf("\n");

Q.38Hard

What is the output of this complex nested control flow? int x = 1, y = 2; if (x < y) { x++; y--; if (x == y) printf("Equal"); else printf("NotEqual"); }

Q.39Hard

What happens when continue is used in a for loop with a post-increment expression?

Q.40Hard

What is the effect of using multiple break statements in nested loops?