16.
What will be the output of the following C++ code?
#include<iostream>
using namespace std;
int main ()
{
int cin;
cin >> cin;
cout << “cin: ” << cin;
return 0;
}
a) cin: garbage value
b) Error
c) Segmentation fault
d) Nothing is printed
17.
Which of the following operator has left to right associativity?
a) Unary operator
b) Logical not
c) Array element access
d) addressof
18.
Which of the following is accessed by a member function of a class?
a) The object of that class
b) All members of a class
c) The public part of a class
d) The private part of a class
19.
What is the size of a character literal in C and C++?
a) 4 and 1
b) 1 and 4
c) 1 and 1
d) 4 and 4
20.
What is the size of a character type in C and C++?
a) 4 and 1
b) 1 and 4
c) 1 and 1
d) 4 and 4