Sports GK Questions and Answers 2024 (Latest Updated)

Awards & Honours GK Questions 2024 (Latest Updated)

Question

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.

Advertisement
Article and Schedule Quiz Start Test!
DOWNLOAD CURRENT AFFAIRS PDF FROM APP
Assam Direct Recruitment Test Series

Computer Science Topics