We want to declare x, y and z as pointers of type int. The alias name given is: intpt The correct way to do this using the keyword typedef is:
Answer: D
Correct answer: typedef int* intptr; intptr x,y,z;
The keyword comes first, followed by the existing type and then the new name: typedef int *intptr;. The alias is then used exactly like a built-in type, so intptr x, y, z; declares three pointers. Note that this is one place the alias behaves better than the raw type - int *x, y, z; would make only x a pointer.
Please log in or register to report this question.