Open In App

C Quiz – 106 | Question 4

“typedef” in C basically works as an alias. Which of the following is correct for “typedef”?

(A) typedef can be used to alias compound data types such as struct and union.
(B) typedef can be used to alias both compound data types and pointer to these compound types.
(C) typedef can be used to alias a function pointer.
(D) typedef can be used to alias an array.
(E) All of the above.

Answer: (E)
Explanation: In C, typedef can be used to alias or make synonyms of other types. Since function pointer is also a type, typedef can be used here. Since, array is also a type of symmetric data types, typedef can be used to alias array as well.
Quiz of this Question

Article Tags :