Q. The following program segment __________.
int a = 10;
int const &b = a;
a = 11;
cout << a << b;
Q. Which of the following is not a storage class
supported by C++?
Q. Consider the following program segment. A complete C++ program with these two statements will __________.
static char X[3] = "1234";
cout << X;
Q. For the declarations 1,2 and 3, which of the Statements is correct.
const char cc = 'h';
Declaration 1: char *cp;
Declaration 2: const char *const ccpc = &cc;
Declaration 3: char *const *cpcp;
Which of the following statements are legal?
Statement 1: cp = *cpcp;
Statement 2: **cpcp = *cp;
Statement 3: *cp = **cpcp;
Q. Which of the following operators cannot be overloaded?
Q. the code class Dog : public X, public Y
is an example of?
Q. Choose the correct statements.
Q. For the below function abc
, Which of the following function calls is/are illegal? (Assume h
, g
are declared as integers)
void abc(int x=0, int y, int z=0)
{
cout << x<< y<< z;
}
Q. The compiler identifies a virtual function to be pure by __________.
Q. Let class APE
be a friend of class SAPIEN
. Let class HUMAN
be a child class of SAPIEN
and let MONKEY
be a child class of APE
. Then,
Q. A class having no name __________.
Q. For a method to be an Interface
between the outside world and a class, it has to be declared __________.
Q. Choose the correct statements from the following :
Q. Overloading
is otherwise called as __________.
Q. C++ encourages structuring a software as a collection of components that are __________.