hits counter
  Create Free Blog | Random Blog »   Report Abuse | Login   

 

Function Prototyping:


Tags:

The function prototyping tells the number of arguments,type of arguments and type of the return type to the compiler.The function prototyping is a declaration statement in the calling program.

General Format:

returnType methodName(Argument List);

*Where Argument List specify the type and name of the arguments.

Example:

float Sum(float x,int y);

Or

float Sum(float,int);

Program:

int MAX(int,int); //Function Prototyping

void main()

{
int A,B;

cout<<”Enter the value for A and B”<<endl;

cin>>A>>B;

int R=MAX(A,B);

cout<<”MAX Is:”<<R<<endl;

}

int MAX(int x,int y) //Call by Value

{
if(x>y) return x;

return y;

}

Share SocialTwist Tell-a-Friend 

2 Responses to “Function Prototyping:”

  1. This is great! Now I want to see your ways for us readers to become more involved! Expect an email later today.
  2. A wonderful article…. In my life, I have never seen a man be so selfless in helping others around him to get along and get working. I feel good that there are people like you too. Thanks for this great weblog of yours. Its surely going to get me to go to higher places!

Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-Spam Image


Powered By Indic IME