hamburger

Which of the Operators cannot be Overloaded in C language?

By BYJU'S Exam Prep

Updated on: September 25th, 2023

1. +

2. –

3. %

4. ::

Operator overloading refers to the ability of C++ language to dispense the operators with a special meaning for a data type.

Answer: Scope resolution operator (::) cannot be overloaded in C language.

Scope resolution operator (::) is used for getting hidden names due to variable scopes so that it can be used. It is an enclosing context where values and expressions are associated. It is used to identify and specify identifiers used in different scopes. In computer programming, the use of scope varies across different programming languages.

It is represented by a double colon and is also known as Paamayim Nekudotayim. It allows access to static, constant, and overridden properties or methods of a class. Besides, it allows access to public and protected members of a base from within the child class. It can be used for the various purpose like:

  • Defining a function outside a class.

  • In case of multiple Inheritance.

  • Accessing a global variable when there is a local variable with the same name.

  • Accessing a class’s static variables.

  • To access the hidden variables or member functions of a program.

Summary:

Which of the Operators cannot be Overloaded in C language?

The operator that cannot be overloaded in C language is the Scope resolution operator (::).

Read More:

PO, Clerk, SO, Insurance

Our Apps Playstore
POPULAR EXAMS
SSC and Bank
Other Exams
GradeStack Learning Pvt. Ltd.Windsor IT Park, Tower - A, 2nd Floor, Sector 125, Noida, Uttar Pradesh 201303 help@byjusexamprep.com
Home Practice Test Series Premium