State whether True or False? (i) Pointer arithmetic can't be done on a void…

2018

State whether True or False?
(i) Pointer arithmetic can't be done on a void pointer.
(ii) A void pointer cannot point to a class member in C++.

  1. A.

    (i) – True, (ii) – True

  2. B.

    (i) – True, (ii) – False

  3. C.

    (i) – False, (ii) – True

  4. D.

    (i) – False, (ii) – False

Attempted by 99 students.

Show answer & explanation

Correct answer: A

Statement (i) is True because C++ forbids arithmetic on void pointers due to their incomplete type size. Statement (ii) is also True as a void pointer cannot store the specific representation required for C++ member pointers. Therefore, both statements are True.

Explore the full course: Uppsc Polytechnic Lecturer 2025 Cs