Professional Documents
Culture Documents
C++ Online Test 3
C++ Online Test 3
Draft saved
*Required
MCQ Question
a) Default constructor
b) Parameterized constructor
c) Copy constructor
d) Friend constructor
1) 5 10
2) 5
3) 10
4) Error
#include<iostream>
usingnamespacestd;
classtest{
public:
staticintn;
test()f--n;}
~test(){}
};
intmain()
{
testm,n,o,p,9;
cout‹‹test::n;
return0;
}
inttest::n=4;
1. 4
2. 1
3. -1
4. 0
3. Default constructor
4. Error
a) Inheritance
b) Polymorphism
c) Abstraction
d) Encapsulation
1. 500
2. 505
3. 504
4. 501
1. 1
2. 0
3. Error
4. 6
1.Hello World
2.Hello worlD
4.HELLO WORLD
a) Left-right
b) Right-left
c) Bottom-up
d) Top-down
1. =
2. ^
3. ()
4. ? :
a) Outer Catch
c) Error
d) Inner Catch
a) Binary
b) VTC
c) Text
d) ISCII
1. double
2. ^oat
3. int
4. bool
1. Error
2. 0 2 4 5
3. 0 2 4
4. 1 3 5
1. 500
2. 505
3. 504
4. 501
2. Overloading of classes
1. 1
2. 0
3. True
4. False
1. Value of y is :True
2. Value of y is : False
3. Value of y is : 1
4. Value of y is : 0
a) call by object
b) call by pointer
c) call by value
d) call by reference
Happy Learning
Learning
earning
Error
1. continue
2. virtual
3. wchar_t
4. typename
a) 5
b) 6
d) runtime error
1.Hello World
2.Hello worlD
4.HELLO WORLD
a) catch
b) throw
c) try
d) Inally
1. 4
2. 1
3. -1
4. 0
a) VAR_1234
b) $var_name
c) 7VARNAME
d) 7var_name
1. Error
2. 0 2 4 5
3. 0 2 4
4. 1 3 5
Happy Learning
Learning
earning
Error
512
152
251
Derived
Base 2 Derived
Error
b) Overloading of classes
1. continue
2. virtual
3. wchar_t
4. typename
1. =
2. ^
3. ()
4. ? :
1. 5
2. 4
3. 6
4. 3
1. via fb
2. via duo
Derived
Base 2 Derived
Error
a) 21
b) 27
c) 26
d) 25
1. Width of box : 10
3. Width of box : 20
Page 2 of 2
Forms