Programming - C++ Language
You Are Here :: Home > C++ Language > Oops - General Questions
25. |
In C++, the range of signed integer type variable is ________(
|
A. |
0 to 216 |
B.
|
2 to 2 1 15 15 - - |
C.
|
2 to 2 1 7 7 - -
|
D.
|
8 0 to 2
|
|
Answer: Option B
Explanation:
|
26. |
To perform stream I/O with disk files in C++, you should
|
A. |
open and close files as in procedural languages. |
B.
|
use classes derived from ios. |
C.
|
use C language library functions to read and write data.
|
D.
|
include the IOSTREAM.H header file.
|
|
Answer: Option B
Explanation:
|
27. |
RunTime Polymorphism is achieved by ______
|
A. |
friend function |
B.
|
virtual function |
C.
|
operator overloading
|
D.
|
function overloading
|
|
Answer: Option B
Explanation:
|
28. |
In C++, dynamic memory allocation is accomplished with the operator ____
|
A. |
new |
B.
|
this |
C.
|
malloc( )
|
D.
|
delete
|
|
Answer: Option A
Explanation:
|
29. |
If we create a file by ‘ifstream’, then the default mode of the file is
|
A. |
ios :: out |
B.
|
ios :: in |
C.
|
ios :: app
|
D.
|
ios :: binary
|
|
Answer: Option B
Explanation:
|
30. |
A variable defined within a block is visible
|
A. |
from the point of definition onward in the program. |
B.
|
from the point of definition onward in the function. |
C.
|
from the point of definition onward in the block.
|
D.
|
throughout the function.
|
|
Answer: Option C
Explanation:
|
« prev
next »