
A.O.C. INSTITUTE
100 Detailed MCQs: Arrays and
Pointers in C
1. What is the size of a pointer variable in C?
A) Always 2 bytes
B) Always 4 bytes
C) Depends on the architecture (32-bit vs
64-bit)
D) Depends on the data type it points to
2. If int *p = 1000;, what is the value of p + 2
(assume sizeof(int) = 4)?
A) 1002
B) 1004
C) 1008
D) 1016
3. [GATE 2005] Which of the following is
equivalent to *(a + i)?
A) a[i]
B) i[a]
C) both A and B
D) none of the above
4. A pointer that is not initialized to any valid
memory address is called:
A) Null Pointer
B) Wild Pointer
C) Dangling Pointer
D) Void Pointer
5. What is the output of printf("%d", *&*&p);
where p is an integer?
A) Address of p
B) Value of p
C) Error
D) Garbage value
6. Which operator is used to get the address
of a variable?
A) *
B) ->
C) &
D) &&
7. [ISRO] If char *ptr; and ptr points to
address 0x2000, what is ptr + 1?
A) 0x2001
B) 0x2004
C) 0x2008
D) 0x2002
8. A pointer that points to nothing is a:
A) Wild pointer
B) Null pointer
C) Void pointer
D) Constant pointer
9. [Concept] Can we subtract two pointers?
A) Yes, if they point to the same array
B) Yes, always
C) No, never
D) Yes, but it returns a float
10. What is the result of adding two pointers?
A) A new address
B) Sum of their indices
C) Illegal operation (Error)
D) Difference in bytes
11. An array name in C behaves like:
A) A variable pointer
B) A constant pointer
C) A null pointer
D) A function
12. What is the output of the following? int
arr[5] = {1, 2, 3}; printf("%d", arr[4]);
A) Garbage
B) 0
C) Error
D) 3
13. [GATE 2011] If int arr[3][3] is defined, how
is arr[1][2] accessed using pointers?