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

Which operator is used to get the address of a variable in C?

Q.2Easy

What will be the size of a pointer variable on a 64-bit system?

Q.3Easy

What is a NULL pointer?

Q.4Medium

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

Q.5Medium

What happens when you increment a pointer? int arr[5] = {1,2,3,4,5}; int *p = arr; p++;

Q.6Easy

Which of the following is NOT a valid pointer declaration?

Q.7Medium

What is the output? int x = 10, y = 20; int *p = &x; int *q = &y; p = q; printf("%d", *p);

Q.8Easy

Identify the output: char *str = "Hello"; printf("%c", *str);

Q.9Hard

What is the difference between *p++ and (*p)++?

Q.10Medium

What will be printed? int arr[] = {1, 2, 3}; int *p = arr; printf("%d", *(p+2));

Q.11Medium

What is a wild pointer?

Q.12Medium

What is the output? int *p = NULL; if(p) printf("Not NULL"); else printf("NULL");

Q.13Medium

Which of the following correctly allocates memory for 10 integers?

Q.14Medium

What is a dangling pointer?

Q.15Hard

What does the following code do? int *p = (int*)malloc(sizeof(int)); *p = 5; free(p); p = NULL;

Q.16Medium

What will be the output? int arr[] = {10, 20, 30}; int *p = arr; printf("%d %d", arr[1], *(p+1));

Q.17Hard

Which statement is true about void pointers?

Q.18Hard

What is the output? int x = 50; int *p = &x; int *q = p; q = NULL; printf("%d", *p);

Q.19Easy

A pointer variable stores the _____ of another variable.

Q.20Easy

What is the size of a pointer variable on a 32-bit system?