- Which of the following type of pointer restricts changes in value/variable pointed by it?
A. Constant pointer to variable
B. Constant pointer to constant value
C. Pointer to variable
D. NULL pointer - What would be the equivalent pointer expression for the array element a[i][j][k][l]
A. ((((a+i)+j)+k)+l)
B. ((((a+i)+j)+k)+l)
C. (((a+i)+j)+k+l)
D. ((a+i)+j+k+l)
- Which of the following is correct about class and structure?
A. class can have member functions while structure cannot have member functions.
B. class data members are public by default while structure members are private.
C. Pointer to structure or classes cannot be declared.
D. class data members are private by default while structure members are public. - If default constructor is not defined, then how the objects of the class will be created? A. The compiler will generate error.
B. Error will occur at run-time.
C. Compiler provides its default constructor to build the object.
D. None of these - All the classes in C++ standard library are included in _ namespace.
A. std
B. object
C. io
D. None of above - Which of the constructor will initialize variable changeme correctly? #include using namespace std; class Test {
const int changeme; public:
void Display()
{
cout<<“\n”<< changeme <<endl;
}
};