Multiple choice

The keyword 'void' is used to _____.

  1. declare a member function that is defined in a subclass

  2. designate the absence of a type

  3. declare objects that can be modified outside of program control

  4. declare a synonym for an existing type

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In programming languages like C and C++, the keyword void is used to designate the absence of a type, such as a function returning no value or a generic pointer type (void*). It specifies that no data type is expected or returned.