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

GeeksforGeeks has prepared a complete interview preparation course with premium videos, theory, practice problems, TA support and many more features. Please refer Placement 100 for details

My Personal Notes arrow_drop_up
Article Tags :
Practice Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.