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