MCQOPTIONS
Bookmark
Saved Bookmarks
→
C++ Programming
→
Constructors And Destructors in C++ Programming
→
Reference is like a _____...
1.
Reference is like a _____.
A.
Pointer
B.
Structure
C.
Macro
D.
Enum
Answer» B. Structure
Show Answer
Discussion
No Comment Found
Post Comment
Related MCQs
What is the output of this program?<br><pre class="prettyprint lang-c">#include <iostream><br> using namespace std;<br> int main() <br> {<br> int num = 6;<br> int* ptr = &num;<br> cout << sizeof(ptr);<br> return 0;<br> }<br></pre>
What is the output of this program?<br><pre class="prettyprint lang-c">#include <iostream><br> using namespace std;<br> void print (char * str)<br> {<br> cout << str << endl;<br> }<br> int main ()<br> {<br> const char * str = "Interview Mania";<br> print(const_cast<char> (str) );<br> return 0;<br> }<br></char></iostream></pre>
What is the output of this program?<br><pre class="prettyprint lang-c">#include <iostream><br> using namespace std;<br> int main()<br> {<br> int num = 11;<br> int & numref = num;<br> num++;<br> cout << "The value of num is " << numref;<br> return 0;<br> }<br></iostream></pre>
What is the output of this program?<br><pre class="prettyprint lang-c">#include <iostream><br> using namespace std;<br> void swap(int &p, int &q);<br> int main()<br> {<br> int p = 5, q = 10;<br> swap(p, q);<br> cout << " In main " << p << q;<br> return 0;<br> }<br> void swap(int &p, int &q)<br> {<br> int temp;<br> temp = p;<br> p = q;<br> q = temp;<br> cout << "In swap " << p << q;<br> }<br></iostream></pre>
What is the output of this program?<br><pre class="prettyprint lang-c">#include <iostream><br> using namespace std;<br> int main()<br> {<br> int num;<br> int *ptr;<br> num = 12;<br> ptr = &num;<br> cout << *ptr;<br> return 0;<br> }<br></pre>
What is the output of this program?<br><pre class="prettyprint lang-c">#include <iostream><br> using namespace std;<br> int main()<br> {<br> int num1, num2;<br> int* Res;<br> Res = &num1;<br> num1 = 150;<br> num2 = 100;<br> *Res = 150;<br> num2 = *Res;<br> cout << *Res << " " << num2;<br> return 0;<br> }<br></pre>
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.
Which of the following statements is correct?Change a reference changes the referent.We can create an array of references.
Which of the following statements is correct?A reference is not a constant pointer.A referenced is automatically de-referenced.
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.
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply