C Programming Reference >> C Basic Tutorials >> C Keywords Home >> returnui 30/12/06 - Views - Ratings : This keyword is used to return from a function. In void returning statements this keyword is optional. In non void returning functions this keyword must be present and returns a value associated with the functions to the calling functions. Main function returns values to operating system. Functions can return value in form of any valid data type. Code - int function (void)
{
int b;
b = scanf ("%d", &b);
return b; \\ returns the value of b to the calling function.
}
|