What does typedef do when applied to a struct name?
-
A
It allocates memory for the type
-
B
It makes every member static
-
C
It blocks copying of the struct
-
D
It creates an alias for the type
Correct answer
Correct answer
D. It creates an alias for the type
14 views
Explanation
typedef only introduces another name for an existing type; it allocates no storage at all.
Reference
Asked in: NTS, PPSC IT, Campus Interviews
Doubts & discussion
Not sure why the answer is D? Ask here and get an explanation.
Ask a doubt about this MCQ