Cplusplus Mock Test III
Cplusplus Mock Test III
This section presents you various set of Mock Tests related to C++ Framework. You can
download these sample mock tests at your local machine and solve offline at your convenience.
Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.
B - Cannot be overloaded.
C - Cannot be overridden.
A - True
B - False
C - Either a or b
D - Both a and b.
A - Inheritance
B - Container classes
C - Polymorphism
A - Function template
B - Class template
B - Inherited class
C - Binary file
C - Only i is true
D - Only ii is true
A - Insertion operator
B - Extraction operator
ii All the files are classified into only 2 types. 1 Text Files 2 Binary Files.
A - Only i is true
B - Only ii is true
Q 11 - An exception is __
A - Runtime error
C - Logical error
A - Only i is true
B - Only ii is true
#include<isotream>
a++;
cout<<a;
}
A-5
B-6
C - Runtime error
D - Compile error
#include<isotream>
A - Equal strings
B - Unequal strings
C - No output
D - Compilation error
#include<isotream>
cout<<india<<” “<<GREAT;
}
A-01
B-02
C-08
D - Compile error
#include<isotream>
cout<<i--;
}
A-0
B - Compile error
C - 65535
D - 32767
#include<isotream>
cout<<”Hi”;
}
A - Compile error
B - Hi
C - HelloHi
D - Hello
#include<isotream>
++i;
cout<<i<<” “;
}
main()
{
f();
f();
f();
}
A-111
B-000
C-321
D-123
#include<isotream>
A - No output
#include<isotream>
switch(x)
{
default: cout<<”Hello”;
case 1: cout<<”Hi”; break;
}
}
A - Hello
B - Hi
C - HelloHi
D - Compile error
#include<isotream>
m = n;
n = x;
}
main()
{
int x = 5, y = 3;
swap(x,y);
cout<<x<<” “<<y;
}
A-35
B-53
C-55
D - Compile error
#include<isotream>
#include<string.h>
A-0
B-1
C - -1
#include<isotream>
float y = 5;
r = y%x;
cout<<r;
}
A-1
B-0
C-2
D - Compile error
#include<isotream>
int i;
};
cout<<sizeof(abc);
}
A-1
B-2
C-4
D-8
A-2
B-4
C-8
D - Compiler dependent
ANSWER SHEET
1 C
2 B
3 D
4 B
5 B
6 A
7 B
8 C
9 B
10 C
11 A
12 A
13 D
14 C
15 C
16 A
17 A
18 D
19 A
20 B
21 B
22 A
23 D
24 C
25 D
Loading [MathJax]/jax/output/HTML-CSS/jax.js