1 / 3

Object as function Argument & Object returning object

Object as function Argument & Object returning object. Object as function Argument. Like other data type , an object can be used as function argument. The copy of the object is passed to the function Class A { in x,y ; Public: Void check( A ); }; Void A :: check( A s){

kert
Download Presentation

Object as function Argument & Object returning object

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. Object as function Argument & Object returning object

  2. Object as function Argument Like other data type , an object can be used as function argument. The copy of the object is passed to the function Class A { in x,y; Public: Void check( A); }; Void A :: check( A s){ x=s.x;y=s.y; } Void main() { A obj1,obj2; obj1.check(obj2); }

  3. Object as function Argument & Object returning object Question Addition of two complex nos 3x +i 5 2x +i 2 --------- 5x +i 7

More Related