Which of the following is a properly defined structure?

Thanh Thảo

New member
Which of the following is a properly defined structure?
A. struct {int a;}
B. struct a_struct {int a;}
C. struct a_struct int a;
D. struct a_struct {int a;};
 
Answer: d
Explanation: option struct {int a;} is not correct because name of structure and ;(after declaration) are missing. In option struct a_struct {int a;} ; is missing. In option struct a_struct int a; {} are missing.
 

Tìm kiếm

Back
Top