1). How many specifiers are present in access specifiers in class?
a) 1
b) 2
c) 3
d) 4
2) Which is used to define the member of a class externally?
a) :
b) ::
c) #
d) none of the mentioned
3) 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; };
4) Constructors are used to
a) initialize the objects
b) construct the data members
c) both initialize the objects & construct the data members
d) none of the mentioned
5) When struct is used instead of the keyword class means, what will happen in the program?
a) access is public by default
b) access is private by default
c) access is protected by default
d) none of the mentioned
6) Correct way of creating an object of a class called Car is
a) Car obj;
b) Car *obj = new Car();
c) Only B
d) A & B both
7) In C++ programming, cout is a/an
a) Function
b) Operator
c) Object
d) macro
8) Which function can be called without using an object of a class in C++
a) Static function
b) Inline function
c) Friend function
d) constant function
9) Overloaded functions in C++ oops are
a) Functions preceding with virtual keywords.
b) Functions inherited from base class to derived class.
c) Two or more functions having same name but different number of parameters or type.
d) None of above
10) Function overloading is also similar to which of the following?
a) operator overloading
b) constructor overloading
c) destructor overloading
d) none of the mentioned
a) 1
b) 2
c) 3
d) 4
2) Which is used to define the member of a class externally?
a) :
b) ::
c) #
d) none of the mentioned
3) 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; };
4) Constructors are used to
a) initialize the objects
b) construct the data members
c) both initialize the objects & construct the data members
d) none of the mentioned
5) When struct is used instead of the keyword class means, what will happen in the program?
a) access is public by default
b) access is private by default
c) access is protected by default
d) none of the mentioned
6) Correct way of creating an object of a class called Car is
a) Car obj;
b) Car *obj = new Car();
c) Only B
d) A & B both
7) In C++ programming, cout is a/an
a) Function
b) Operator
c) Object
d) macro
8) Which function can be called without using an object of a class in C++
a) Static function
b) Inline function
c) Friend function
d) constant function
9) Overloaded functions in C++ oops are
a) Functions preceding with virtual keywords.
b) Functions inherited from base class to derived class.
c) Two or more functions having same name but different number of parameters or type.
d) None of above
10) Function overloading is also similar to which of the following?
a) operator overloading
b) constructor overloading
c) destructor overloading
d) none of the mentioned