Which of the following is a valid class declaration?
(a) class A { int x; };
(b) class B { }
(c) public class A { }
(d) object A { int x; };
This question was posed to me in a national level competition.
This key question is from Classes topic in chapter Source Files, Classes and Operator Overloading in C++ of C++