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
Similar Questions from HTET Exam - Level 3 - Year 2021
Question 1
Easy
Source :
HTET 2021
Consider the following C++ statements:
int x; int& y = x;
The statement: y=25; $x=2*x+30$ updates the value of x and y as:
Chapter :
Python Programming Fundamentals
Topic :
Operators & Expressions
Question 2
Easy
Source :
HTET 2021
In MS-Office which can be used for quick access to commonly used commands and tools ?
Chapter :
Office Automation Tools
Topic :
Word Processor (MS Word)
Question 3
Easy
Source :
HTET 2021
A functional dependency is a relationship between or among :
Chapter :
Database Management System (DBMS) & SQL
Topic :
Database Concepts
Question 4
Easy
Source :
HTET 2021
A linear list of elements in which deletion can be done from one end (front) and insertion can take place only at the other end…
Chapter :
Data Structures (Through C++)
Topic :
Queue