Function Argument in C Language

A function in C can be called either with arguments or without arguments. These function may or may not return values to the calling functions. All C functions can be called either with arguments or without arguments in a C program.

When a function is called, we always supply one or more values to the function, called arguments.

return datatype function_name (list of arguments);

Arguments greatly increase the usefulness and flexibility of a function.

We also can call the function (void) without any arguments.

For Example :

int square (int a );    /* Here a is an argument of type int  */
int square ( );
int square (void);    /* These are the functions without any arguments   */

 

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: