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

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

Q.162Easy

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

Q.163Easy

Which of the following is a void pointer?

Q.164Easy

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

Q.165Easy

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

Q.166Easy

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

Q.167Easy

What does void *ptr represent?

Q.168Easy

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

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

Q.170Easy

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

Q.171Easy

How does free() handle a NULL pointer?

Q.172Easy

What is the result of: int x = 5; int *p = &x; int *q = p; if p == q?

Q.173Easy

What happens with: int arr[10]; int *p = arr; *p = 5; printf("%d", arr[0]);?

Q.174Easy

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

Q.175Easy

Consider the declaration: const int *p; and int * const q; Which statement is TRUE?

Q.176Easy

What is the primary issue with this code? int *p; *p = 10;

Q.177Easy

What is the primary difference between a structure and a union in C?

Q.178Easy

What will be the output of sizeof(union test) if union has members: int a, char b, float c?

Q.179Easy

Which keyword is used to define a structure in C?

Q.180Easy

What is the size of the following structure? struct point { int x; int y; float z; };