Question No. 1
We can ________________references.
increment
decrement
reassign
none of the given
Question No. 2
Special name which is substituted in code by its definition and as a result we get an expanded code is called
Union
Directive
Array
Macro
Question No. 3
For binary member operators, operands on the _____ drives (calls) the operation.
Left
Right
Both left and right
None of the given options.
Question No. 4
In c++ the region of available memory is called _________________.
heap
empty space
free store
allocated memory
Question No. 5
To prevent dangling reference the functions returning reference should be used with _______
local variables
global variables only.
arrays
static and global variables
Question No. 6
A friend function of a class is a function defined ________________________.
inside that class and that has no access to the members of the class
outside that class and that has the right to access public members of the class only
outside that class and that has the right to access all members of the class.
outside that class and that has the right to access all members of the class.
Question No. 7
The memory allocation functions return a chunk of memory with a pointer of type_______________.
integerinteger
float
ptr
void
Question No. 8
Friend classes are used in cases where one class is ____________to another class
tightly coupled
loosely coupled
independent
encapsulated
Question No. 9
Overloading means :
Using the same name to perform multiple tasks or different tasks depending on the situation.
Using the different name to perform multiple tasks or different tasks depending on the situation
Using the same name to perform multiple tasks or same tasks depending on the situation
Using the same name to perform difficult tasks or complex tasks and it does not depend on the situation
Question No. 10
Object code is machine code but it is not _____________ and ___________
relocatable , executable
faster , efficient
compiled ,debugged
tested , compiled
Question No. 11
In a NULL pointer, all zeros are _____________memory addresses
valid and constant
variable
invalid
None of the above
Question No. 12
The function will return a reference to the global variable that exists throughout the program and thus there will be no danger of
_______________.
garbage collection
dangling reference.
wastage of memory
system crash
Question No. 13
Care must be taken about the correct ______________ of operator while overloading. (Choose the most appropriate).
Semantic
Complexity
Both Semantic and Complexity
None of the given options
Question No. 14
During compilation compiler looks for the ____________ and process it first
source code
object code
built in functions
preprocessor directives
Question No. 15
The members of a class declared with the keyword class are __________ by default
protected
private
public
constant
Question No. 16
public or private keywords can be ______________
written only for once in the class or structure declaration
written multiple times in the class or structure declaration
written only twice in the class declaration
written outside the class
Question No. 17
The destructor is used to ______________.
allocate memory
deallocate memory
create objects
allocate static memory
Question No. 18
Constructor is a special function, called whenever we ____________________.
create a function
instantiate an object of a class
destroy an object
create a class
Question No. 19
When an operator function is define as member function for a Unary operator then the number of argument it take is/are,
Zero
One
Two
N arguments
Question No. 20
syntax of declaration of a function that returns the reference to an integer is ___________.
int & myfunc() ;
int myfunc();
int myfunc() &;
integer & myfunc();
0 comments
Post a Comment