Search

Formal arguments | types of Formal arguments | call by value | Call by address | call by reference |


 Types Of Formal Arguments : 

It is of three types ------------

1.  ordinary variable  of any type

2.  pointer variable

3. reference variable


Call by value :  

                      when formal arguments are ordinary variables , it is function call by value.

int sum(int x , int y) 

{


}


Call by address :

                 when formal arguments are pointer variables , it is function call by address.

int sum(int *x , int *y) 

{


}


call by reference :

                 when formal arguments are reference variables , it is function call by reference.

int sum(int &x , int &y) 

{


}

Best book to learn c language and DSA , available in amazon : 


No comments:

Post a Comment

DATA TYPES

 "Data types specifies the type and size of data . " A program contains different types of data (integer , real , character etc.) ...