Question
Easy

Which symbol should be used to pass the object by reference in C++?

1
&
2
@
3
$
4
None of the above
Question Details
Time to Solve: 12
Exam: HTET
Level/Paper: Level 3
Chapter: Object-Oriented Programming (C++)
Topic: OOP Concepts
Correct Answer
Option A
Explanation

The correct option is (1): In C++, the ampersand symbol (&) is the specific and correct symbol used in a function's parameter list to declare a variable as a reference. This mechanism is known as "pass by reference." When you pass an object to a function by reference (e.g., void func(ClassName& obj)), you are not creating a duplicate copy of the object; instead, the parameter obj becomes a direct alias…Read More

Which symbol should be - HTET Level 3 | Clear Cutoff