C Programming :: Declarations and Initializations - Discussion
Home > C Programming > Declarations and Initializations > MCQs Questions Discussion
44 / 54
Choose the correct option.
Which is the valid declaration?
A#typedef struct { int i;}in;
Btypedef struct in {int i;};
C#typedef struct int {int i;};
Dtypedef struct {int i;} in;
Answer: Option (Login/Signup)
Show Explanation
Asked In ::
TRICK
Option D is incorrect, as struct should have a name associated with it.
Option B is incorrect, as typedef is used to give a type a new name, or we can say that it is used to give a name to your user defined data types. But, here we are not doing so.
Option A and C are also incorrect because we do not use a '#' with 'typedef'.
Read Full Answer
Report Error
Please Login First Click Here
TRICK
Option B is also correct. Type it out @ideone.com and check yourself.
Read Full Answer
Report Error
Please Login First Click Here