The document defines a function called square that takes an integer as a parameter and returns the square of that integer. The main function declares the square function, calls it to calculate the square of 5 and store the result in the variable x, then waits for input before ending.
1 of 3
Download to read offline
More Related Content
Fuction call
1. Control Flow void main() { int square(int); //Function Decleration clrscr(); int x = square(5); //Function Call getch(); } int square(int a) //Function Definition { return(a * a); }
2. Control Flow void main() { int square(int); //Function Decleration clrscr(); int x = square(5); //Function Call getch(); } int square(int a) //Function Definition { return(a * a); }
3. Control Flow void main() { int square(int); //Function Decleration clrscr(); int x = square(5); //Function Call getch(); } int square(int a) //Function Definition { return(a * a); }