"Life is like riding a bicycle. To keep your balance you must keep moving."
- Albert Einstein
The keyword used to transfer control from a function back to the calling function is
Answer: Option B
The keyword return is used to transfer control from a function back to the calling function.
int add(int, int); /* Function prototype */
int a = 4, b = 3, c;
c = add(a, b);
printf("c = %d\n", c);
int add(int a, int b)
/* returns the value and control back to main() function */
(Thu, Mar 31, 2011 08:10:46 AM)
What is return function? how to understant that easily?
(Mon, Jun 13, 2011 12:32:43 PM)
The return 0 in the main function transfers the control back to OS (DOS), and denotes that program exits successfully.
It may return 0 for successful completion, -1 to denote error occurred.
From your c program you can call another c program.
system("mypro.exe") - This function will return 0 on successful completion and -1 on error situation.
(Mon, Aug 15, 2011 05:51:59 PM)
What is prototype? Explain in detail please.
(Tue, Aug 30, 2011 05:07:35 AM)
If any declearation is not persent in the original pattern then prototype error will occur.
Ex: If you type only print in turboc then it will show you print is a prototype or not specified the header file then also it will come such as if you use getch() without use of the #include<conio.h> header file (in turboc) then it will come getch() is a prototype.
(Sun, Oct 30, 2011 06:07:32 PM)
In simple way, return is a c-keyword used to transfer the control from called function to calling function. It can also use for return a single value.