1 / 10

Operator Overloading In C | What Is Operator Overloading In C ? | C Program

This presentation on Operator Overloading in C will help you understand What is Operator Overloading in C and how an operator is overloaded to provide special meaning to the user-defined datatype. We'll also learn the operators which can't be overloaded, along with the types of operator overloading in C . We'll cover some hands-on examples on C Operator overloading.<br><br>1.u200b What is Operator overloading?<br>2. Non-overloadable operators:<br>3.u200b Types of operator overloading in C <br>4.u200b Unary Operator overloading<br>5.u200b Binary Operator overloading<br><br>

Simplilearn
Download Presentation

Operator Overloading In C | What Is Operator Overloading In C ? | C Program

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. What’s in it for you ? What is Operator Overloading ? Non-overloadable operators Types of operator overloading in C++ Unary operator overloading Binary operator overloading

  2. What is Operator Overloading ? It is a specific case of polymorphism in which the operator is overloaded to provide special meaning to the user-defined datatype General syntax :returnType operator symbol (arguments)

  3. Click here to watch the video

  4. Non-Overloadable operators . (It is known as dot operator) 2) : : (It is known as scope resolution operator) ? : (It is known as ternary operator) . * (It is known as pointer to member operator) 4 2 1 3

  5. Types of operator overloading in C++ Operator Overloading Unary operator overloading Binary operator overloading Binary operator overloading Unary operator overloading

  6. Unary operator overloading An operator which contains only one operand is known as unary operator overloading Syntax using class function return_type operator symbol() Syntax using friend function friend return_type operator symbol(argument);

  7. Binary operator overloading An operator which contains two operands is known as Binary operator overloading Syntax using class function return_type operator symbol (argument) Syntax using friend function friend return_type operator symbol (argument 1, argument 2);

More Related