C – Function Prototypes

C – Function Prototypes 2017-08-06T10:12:35+00:00

Function Prototypes:

A function, depending on whether arguments are present or not and  whether a value is returning or not,may belongs to one of the following categories.

  1. Function with no arguments and return no value.
  2. Function with arguments and no return value.
  3. Function with arguments and return value.
  4. Function with no arguments and return value.

Category-1:Function with no arguments and no return value:

In this type the function has no arguments, it does not receive any data from the calling function. Similarly it does not return any value, the calling function does not receive any data from called function. So there is no data communication between calling function and called function.

C – CATEGORY 1 EXAMPLE PROGRAM :

Category-2 Function with  arguments and no return value:

In this type the function has some arguments, it receives data from the calling function. But it doesnot return any value, the calling function doesnot receive any data from the called function. So there is one way data communication between calling function and called function.

C – CATEGORY 2 EXAMPLE PROGRAM :

Category-3:Function with  arguments and  return value :

In this type the function has some arguments, it receives data from the calling function. Similarly it returns a value, the calling function  receives data from the called function. So there is two way data communication between calling function and called function.

C – CATEGORY 3 EXAMPLE PROGRAM :

Category-4: Function with  no arguments and  return value:

In this type the function has no arguments, it doesnot receive any data from the calling function. But it returns a value, the calling function receives data from the called function. So there is one way data communication between called function and calling function.

C – CATEGORY 4 EXAMPLE PROGRAM :

 

Prev Next