Sunday, 20 May 2012

What is function argument?

    Function arguments are given inside the parenthesis, preceded by their types and separated by commas. If a function does not use any argument, the word void is used inside the parenthesis. For example:
int getchar(void);
double pow(double x,double y);
The first function int getchar(void); return an integer value and does not take any arguments.
The second function double pow(double x,double y); takes two double arguments and return a value of the type double.

No comments:

Post a Comment