Value of a in a = (b = 5, b + 5); is
What’s wrong? (x = 4 && y = 5) ? (a = 5) ; (b = 6);
Which of the following correctly describes the meaning of‘namespace’ feature in C++?
If class A is friend of class B and if class B is friend of class C, which of the following is true?
Is the size of character literals different in C and C++?
Size of C++ objects are expressed in terms of multiples of the size of a ____ and the size of a char is ____.
The size of an object or a type can be determined using which operator?
How do we define a constructor?
The output of this program is int a = 10; void main(){ int a = 20; cout << a << ::a;}
What is meaning of following declaration? int(*p[5])();
What will be the output of this program? 1.#include
2.using namespace std;
3.int main()
4.{
5.int a = 8;
6.cout << "ANDing integer 'a' with 'true' :" << a && true;
7.return 0;
8.}
Which looping process checks the test condition at the end of the loop?
What is the output of this program? 1.#include
2.using namespace std;
3.void swap(int &a, int &b);
4.int main()
5.{
6.int a = 5, b = 10;
7.swap(a, b);
8.cout << "In main " << a << b;
9.return 0;
10.}
11.void swap(int &a, int &b)
12.{
13.int temp;
14.temp = a;
15.a = b;
16.b = temp;
17.cout << "In swap " << a << b;
18.}
Which of three sizes of floating point types should be used when extended precision is required?
What’s wrong? for (int k = 2, k <=12, k++)
Which one of the following is not a possible state for a pointer.
What is the output of this program? 1.#include
2.using namespace std;
3.int main()
4.{
5.int array[] = {10, 20, 30};
6.cout << -2[array];
7.return 0;
8.}
What is the output of this program? 1.#include
2.using namespace std;
3.enum cat {
4.temp = 7
5.};
6.int main()
7.{
8.int age = 14;
9.age /= temp;
10.cout << "If you were cat, you would be " << age << endl;
11.return 0;
12.}
What is the output of this program? 1.#include
2.using namespace std;
3.void print (char * a)
4.{
5.cout << a << endl;
6.}
7.int main ()
8.{
9.const char * a = "Hello world";
10.print(const_cast (a) );
11.return 0;
12.}
‘Prime area’ in context of file system is defined as
Which of the following is a valid floating point literal?
What is the output of this program? 1.#include
2.using namespace std;
3.int main()
4.{
5.float f1 = 0.5;
6.double f2 = 0.5;
7.if(f1 == 0.5f)
8.cout << "equal";
9.else
10.cout << "not equal";
11.return 0;
12.}
Which of the following is not a standard exception built in C++.
Statement scanf(“%d”,80);
The default access level assigned to members of a class is ___________.
Which is correct with respect to size of the datatypes?
There is nothing like a virtual constructor of a class.
What is the output of this program? 1.#include
2.using namespace std;
3.int main()
4.{
5.int a = 5, b = 10, c = 15;
6.int *arr[ ] = {&a, &b, &c};
7.cout << arr[1];
8.return 0;
9.}
Identify the correct sentence regarding inequality between reference and pointer.
Inline functions are invoked at the time of
What will be the output of this program? 1.#include
2.using namespace std;
3. int main()
4.{
5.char c = 74;
6.cout << c;
7.return 0;
8.}
The correct statement for a function that takes pointer to a float, a pointer to a pointer to a char and returns a pointer to a pointer to a integer is
What is the output of this program? #include
using namespace std;
int main()
{
int arr[] = {4, 5, 6, 7};
int *p = (arr + 1);
cout << *p;
return 0;
}
What is the difference between overloaded functions and overridden functions?
Which of the following below is /are a valid iterator type?
Which of the STL containers store the elements contiguously (in adjacent memory locations)?
Which of the following is illegal?
What is the output of this program? 1.#include
2.using namespace std;
3.void addprint()
4.{
5.static int s = 1;
6.s++;
7.cout << s;
8.}
9.int main()
10.{
11.addprint();
12.addprint();
13.addprint();
14.return 0;
15}
Which of the following members do get inherited but become private members in child class