Question
Easy
In C++, an overloaded unary operator defined as a member function requires how many variables to be passed as function argument?
1
Zero
2
One
3
Two
4
An unary operator can not be overloaded
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): When a unary operator (such as the logical NOT \!, increment ++, or unary negation -) is overloaded as a member function of a class in C++, it requires zero explicit arguments in its function signature. The essential principle here is the implicit this pointer. A unary operator operates on a single operand. For a member function, this single operand is the object on which…Read More
Similar Questions from HTET Exam - Level 3 - Year 2022
Question 1
Easy
Source :
HTET 2022
In HTML5 the _______ element is used to include images, graphs and compound objects that contain text and images, in webpage.
Chapter :
Web Designing using HTML
Topic :
HTML Basics
Question 2
Easy
Source :
HTET 2022
Consider Column-I and Column-II: Column-I - Column-II i. 3D Studio - a. Search Engine ii. Ubuntu - b. Anti virus, iii. Duck Duck Go -…
Chapter :
Computer Networks & Internet
Topic :
Internet Fundamentals
Question 3
Easy
Source :
HTET 2022
How many times 'save trees' will be displayed by C++ loop?
do { cout << "save trees"; } while(0);
Chapter :
Python Programming Fundamentals
Topic :
Control Structures
Question 4
Easy
Source :
HTET 2022
In HTML version-5, the purpose of this element is to encapsulate group of links:
Chapter :
Web Designing using HTML
Topic :
HTML Basics