Friday, November 13, 2009

What is declaration of function in C programming?



Function declaration and function definition in c:

1. If function definition has written after the function call then it is necessary to declare the function before the function call because function call statement has no idea about prototype of calling function.

Example 1:

#include



float sachin(int x){

float r=(float)x;

return r;

}


int main(){

No comments:

Post a Comment