closepop
closepop

Would you like to submit the test?


C++ :

References




1.
Which of the following statement is correct?

A reference is stored on heap.
A reference is stored on stack.
A reference is stored in a queue.
A reference is stored in a binary tree.




2.
Which of the following statements is correct?

Once a reference variable has been defined to refer to a particular variable it can refer to any other variable.
A reference is not a constant pointer.

Only 1 is correct.
Only 2 is correct.
Both 1 and 2 are correct.
Both 1 and 2 are incorrect.




3.
Functions can be declared to return a reference type. There are reasons to make such a declaration/Which of the following reasons are correct?

The information being returned is a large enough object that returning a reference is more efficient than returning a copy.
The type of the function must be a R-value.

Only 1 is correct.
Only 2 is correct.
Both 1 and 2 are correct.
Both 1 and 2 are incorrect.




4.
Which of the following statements is correct?

Change a reference changes the referent.
We can create an array of references.

Only 1 is correct.
Only 2 is correct.
Both 1 and 2 are correct.
Both 1 and 2 are incorrect.




5.
Which of the following statement is correct about the references?

A reference must always be initialized within functions.
A reference must always be initialized outside all functions.
A reference must always be initialized.
Both A and C




6.
A reference is declared using the _____ symbol.

&&
&
||
!




7.
Which of the following statement is correct?

Once a reference variable has been defined to refer to a particular variable it can refer to any other variable.
A reference is indicated by using && operator.
Once a reference variable has been defined to refer to a particular variable it cannot refer to any other variable.
A reference can be declared beforehand and initialized later.




8.
Which of the following statements is correct?

A reference is not a constant pointer.
A referenced is automatically de-referenced.

Only 1 is correct.
Only 2 is correct.
Both 1 and 2 are correct.
Both 1 and 2 are incorrect.




9.
Which of the following statements is correct?

An array of references is acceptable.
We can also create a reference to a reference.

Only 1 is correct.
Only 2 is correct.
Both 1 and 2 are correct.
Both 1 and 2 are incorrect.




10.
Which of the following statement is correct?

A referenced has to be de-referenced to access a value.
A referenced does not need to be de-referenced to access a value.
A referenced has to be double de-referenced to access a value.
Whether a reference should be de-referenced or not depends on the type of the reference.




11.
Which of the following statements is correct?
Once the variable and the reference are linked they are tied together.
Once the reference of a variable is declared another reference of that variable is not allowed.

Only 1 is correct.
Only 2 is correct.
Both 1 and 2 are correct.
Both 1 and 2 are incorrect.




12.
Which of the following statements is correct?
We can return a global variable by reference.
We cannot return a local variable by reference.

Only 1 is correct.
Only 2 is correct
Both 1 and 2 are correct.
Both 1 and 2 are incorrect.




13.
Reference is like a _____.

Pointer
Structure
Macro
Enum




14.
Which of the following statement is correct?

An array of references is acceptable.
Once a reference variable has been defined to refer to a particular variable it can refer to any other variable.
An array of references is not acceptable.
Reference is like a structure.




15.
Which of the following statements is correct?
Pointer to a reference and reference to a pointer both are valid.
When we use reference, we are actually referring to a referent.

Only 1 is correct.
Only 2 is correct.
Both 1 and 2 are correct.
Both 1 and 2 are incorrect.










FreshersLive - No.1 Job site in India. Here you can find latest 2016 government as well as private job recruitment notifications for different posts vacancies in India. Get top company jobs for both fresher and experienced. Job Seekers can get useful interview tips, resume services & interview Question and answer. Practice online test free which is helpful for interview preparation. Register with us to get latest employment news/rojgar samachar notifications. Also get latest free govt and other sarkari naukri job alerts daily through E-mail.


FreshersLive - No.1 Job site in India. Here you can find latest 2016 government as well as private job recruitment notifications for different posts vacancies in India. Get top company jobs for both fresher and experienced. Job Seekers can get useful interview tips, resume services & interview Question and answer. Practice online test free which is helpful for interview preparation. Register with us to get latest employment news/rojgar samachar notifications. Also get latest free govt and other sarkari naukri job alerts daily through E-mail.