All mock tests are FREE till 31 December — register to save your progress
Unit 3 · Programming Languages and Computer Graphics Paper 2 CS · June 2024 (Re-Exam)

Which of the following statements about pointers in C are TRUE.

(A) Pointers can be used to access array elements

(B) Pointers can store the address of another pointer

(C) Pointers are automatically deferenced in expression

(D) Pointers cannot be used to access structure members

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: B. (A) and (B) Only

Explanation

Pointers can walk through array elements and can hold the address of another pointer (int **p). They are not dereferenced automatically, and they can access structure members with ->.

More Programming Languages and Computer Graphics questions