The Gateway to Computer Science Excellence
+7 votes

Which of the following operator(s) cannot be overloaded?

  1. .(member Access or Dot operator)
  2. ?: (ternary or Conditional Operator)
  3. :: ( Scope Resolution Operator)
  4. All of the above
in Object Oriented Programming by Boss (33k points) | 2.7k views

3 Answers

+9 votes

Operators which cannot be overloaded[edit]

  • ?: (conditional)
  • . (member selection)
  • .* (member selection with pointer-to-member)
  • :: (scope resolution)
  • sizeof (object size information)
  • typeid (object type information)


Ans: D

by Loyal (7.3k points)
+6 votes

All ternary operators can't be overloaded so ans is option D.

edited by
+1 vote

List of operators that cannot be overloaded

1. Scope resolution operator   (::)   
2. Pointer-to-member Operator (.*)   
3. Member Access or Dot operator  (.)   
4. Ternary or Conditional Operator  (?:)
5. Object size Operator   (sizeof)
6. Object type Operator   (typeid)

option D

by Boss (10.8k points)
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,291 answers
104,890 users