iGET

C Programming - MCQ Practice Questions

C questions in placement tests and university exams are rarely about syntax alone. Most of what you will find here is output prediction, pointer arithmetic, arrays and strings, structures and unions, storage classes, recursion, and file handling. The explanations walk through memory behaviour step by step, which is usually where the confusion sits rather than in the code itself.

972 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.4Easy

Which of the following is NOT a valid pointer declaration?

Q.5Easy

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

Q.6Easy

A pointer variable stores the _____ of another variable.

Q.7Easy

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

Q.8Easy

Consider: int x = 10; int *p = &x; What does the expression *p represent?

Q.9Easy

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

Q.10Easy

What will be printed by the code: char *ptr = "Hello"; printf("%c", *ptr);

Q.11Easy

What is the size of a pointer variable in a 64-bit system?

Q.12Easy

What does the & operator do when used with a variable?

Q.13Easy

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

Q.14Easy

Which of the following is a void pointer?

Q.15Easy

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

Q.16Easy

What will be the size of the pointer variable on a 64-bit system?
int *ptr;

Q.17Easy

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

Q.18Easy

What does void *ptr represent?

Q.19Easy

What is the output?
void swap(int *a, int *b) {
int temp = *a;
*a = *b;
*b = temp;
}
int x = 5, y = 10;
swap(&x, &y);
printf("%d %d", x, y);

Q.20Easy

What is the output?
char str[] = "ABC";
char *p = str;
printf("%c", *(p+2));