Multiple choice

Which one of the following is a user defined data type?

  1. Array

  2. Pointer

  3. Union

  4. Function

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

Union is a user-defined data type that allows different data types to share the same memory location. Arrays and pointers are built-in types provided by the language, while functions are program constructs, not data types. Union, along with struct, enum, and class, must be defined by the programmer before use.