2
2
2
Compile Time
Run Time
Both A and B
Ans B
Infinity
-1
Ans d
% %
( )
{ }
Ans c
&
.
Ans b
call by value
call by reference
call by address
pointer
arrays
unions
Ans a
private
public
protected
infinity
Ans a
Which of the following denote library function in C++?
isalpha
isdigits
isspace
% exforsys[]
& exforsys[]
* exforsys[]
@ exforsys[]
Ans c
main()
scanf()
system()
Ans a
The variables that can be used only within the function in which it is
declared is called as
Global Variables
Local Variables
Both A and B
ifstream
ofstream
Both A and B
int exforsys(10);
float exforsys[5][5];
int exforsys[5];
Ans b
private
public
protected
iomanip.h
manip.h
ifstream.h
The header file that must be included while using cout function in a C++
program is
conio.h
math.h
iostream.h
static variables
register variables
global variables
&
?:
%
Ans b
ios
fstream
ostream
has no body
&
Ans d
Which of the following denote newline character in C++ program?
'/nc'
'nc'
'/n'
'\n'
Ans d
Only Once
:
;
Ans c
In a C++ program each statement is ended with the character
Ans b
&
<
<<
Ans c (important)
Inheritance
Encapsulation
Polymorphism
All the Above
Ans d
What is used to convert C++ source code into object modules?
Compiler
Linker
Both A and B
Ans a
do-while
while
Both A and B
Ans b
Precondition
Post-condition
Both A and B
Ans b
Comments in C++ program is written by using
/ /
//
/* /*
* *
Ans b
>>
<
<<
>
Ans a
while
do-while
for
assign
malloc
new
Infinity
Ans b
Which of the following notation compares two variables X and Y?
X==Y
X=Y
X!=Y
X equals Y
Ans a
Both A) and B)
get
write
Ans a
Pointer Variable
Subscripted variable
Index Variable
Real Variable
Ans b
In C++ the function that is used to release the block of memory already
used is
release
deallocate
delete
real
double
float
int
Ans a
new
delete
Both A and B
Positive Integer
Negative Integer
Both A and B
Float
Ans a
Data Hiding
Data Isolation
Data Encapsulation
Arrays
Structures
Both A and B
&
Ans d
&exforsys[0]
&exforsys[9]
*exforsys[0]
No Value Returned
-1
0
Ans d
Area named
Namearea
Namespaces
The class with name exforsys and having integer data x in its have
constructor name as
exforsys
any name
Ans a
double
int
float
None of the Above
Ans b
Which of the following language given below uses the concepts of OOPS?
C++
Java
C#
global
static
volatile
simple constructor
copy constructor
Both A and B
What is the value of variable z when the following program segment ends?
int z; for(z=0; z<50; z++) {}
51
49
50
Ans d
declaration
definition
Both A and B
Inline
Macros
Both A and B
warning occurs
Which of the following OOPS concepts are used with cin and cout?
Encapsulation
Data Hiding
Operator Overloading
Both A and B
Ans c
Member Function
Class Function
Object Function
Virtual function
Function overloading
Operator Overloading
Class
Object
Method
Ans b
&&
^&
!&
&
Ans a
Vector
ArrayList
Both A and B
Virtual Function
Namespaces
copy constructor
Ans c
zero
NULL
one
No Entry in vtable
Ans b
Class that reads and writes to an array in memory is
ostream
ifstream
strstream
Both A and B
Ans c (imp)
The member functions of a class can be defined outside the class using
Extraction Operator
Insertion Operator
Objects have
behavior
state
Both A and B
Ans c
sizeof
::
:?
Ans b
Assignment operator
Copy constructor
Both A) and B)
None of the Above
Ans b
Ans c
virtual destructor
virtual constructor
Both A and B
Ans a
Explicit Instantiation
Implicit instantiation
Both A and B
Ans c (imp)
The inserting of the code of a called function at the point where the
function gets called is achieved by using
Inline functions
virtual functions
Both A and B
Both A and B
Ans c (imp)
delete
realloc
Both A and B
Extensibility
Both A and B
Ans c
overloaded
Overriding
Both A and B
<<
Ans d
::
Derived class
Base class
Both A and B
The data members and member functions that are only available to derived
classes are
private
public
protected
Ans c(???)
For the class exforsys defined as below: class exforsys() { }; int main() {
exforsys a; } Which of the following is TRUE?
Ans b
Class
Object
Both A and B
Ans a
Which of the following allocates memory but does not initialize it?
new operator
operator new
Both A and B
Ans b (imp)
Encapsulation
Polymorphism
Inheritance
When object of the first class is instantiated then which of the following
is called?
Destructor
Constructor
Both A and B
None of the Above
Ans b
The overriding method must have the which of the following same as that of
the method in the super class definition
same identifier
same signature
Both A and B
One
Zero
Two
conditional statement
assignment statement
looping statement
Ans b
Both A and B
Ans c
If a function in C++ does not return a value then its return type is
denoted as
float
void
int
Ans b
Java
C++
Simula