Skip to content

Tag Archives: References

This article focuses on function/method overloads by references, as well as the types of arguments that can be passed. Prerequisites:Want to learn from the best… Read More
Prerequisites: lvalue reference rvalue reference Copy Semantics (Copy Constructor) References:Want to learn from the best curated videos and practice problems, check out the C++ Foundation… Read More
Pointers: A pointer is a variable that holds memory address of another variable. A pointer needs to be de referenced with * operator to access… Read More
Output of following C++ program?Take a step-up from those "Hello World" programs. Learn to implement data structures like Heap, Stacks, Linked List and many more!… Read More
#include<iostream> using namespace std;    int &fun() {     int x = 10;     return x; } int main() {     fun() = 30;     cout << fun();     return… Read More
Predict the output of following C++ program.Take a step-up from those "Hello World" programs. Learn to implement data structures like Heap, Stacks, Linked List and… Read More
Which of the following functions must use reference. (A) Assignment operator function (B) Copy Constructor (C) Destructor (D) Parameterized constructor Answer: (B) Explanation: A copy… Read More
Which of the following is FALSE about references in C++ (A) References cannot be NULL (B) A reference must be initialized when declared (C) Once… Read More
What is the return value of f(p, p) if the value of p is initialized to 5 before the call? Note that the first parameter… Read More