Online GK Series

This site is dedicated to the aspirants of competitive exams SSC, UPSC, Railways, Postal Assistants, Bank, GATE and NET

Q.

What is wrong with the following code?

	struct Person{
		char *name;
		struct Person Mother, Father;
	}Anita;
	
A The ; should appear after the } and Anita be defined later
B name should be defined as an array
C struct Person Mother, Father; must be defined as struct Person *Mother, *Father;
D There is no error in the code
Answer & Explanation
Option: [C]

struct is new data type which contains many different types of member variables under a single name.

Computer Science Books

Your Valuable Comments Please...

Please Like Us
Brand