Which of the following statements is correct? 1.A struct can have properties. 2.Constructors can be found in structs. 3.A struct can have protected data members. 4.A struct cannot have methods. 5.Constants are not allowed in structs.
A. 1, 2
B. 3, 4
C. 1, 2, 4
D. 3, 5
Answer:A
Which of the following statements is correct? 1.A struct can have properties. 2.Constructors can be found in structs. 3.A struct can have protected data members. 4.A struct cannot have methods. 5.Constants are not allowed in structs.
A. 1, 2 B. 3, 4 C. 1, 2, 4 D. 3, 5
Explanation: 1 and 2 statements are correct.