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
Which operator is used to get the address of a variable in C?
What will be the size of a pointer variable on a 64-bit system?
What is a NULL pointer?
Which of the following is NOT a valid pointer declaration?
Identify the output: char *str = "Hello"; printf("%c", *str);
A pointer variable stores the _____ of another variable.
What is the size of a pointer variable on a 32-bit system?
Consider: int x = 10; int *p = &x; What does the expression *p represent?
Which operator is used to get the address of a variable?
What will be printed by the code: char *ptr = "Hello"; printf("%c", *ptr);
What is the size of a pointer variable in a 64-bit system?
What does the & operator do when used with a variable?
What is the output of the following code? int x = 20; int *p = &x; printf("%d", *p);
Which of the following is a void pointer?
What is the output of the following code? int x = 5; int *p = &x; int q = &p; printf("%d", q);
What will be the size of the pointer variable on a 64-bit system? int *ptr;
What is the output? int arr[] = {10, 20, 30}; int *p = arr; printf("%d %d", *(p+1), arr[1]);
What does void *ptr represent?
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);
What is the output? char str[] = "ABC"; char *p = str; printf("%c", *(p+2));