WHAT IS THE USE OF RETURN STATEMENT?

Sumit Kesarwani

Total Post:782

Points:3910
Posted by  Sumit Kesarwani
C# 
C#
 1481  View(s)
Ratings:
Rate this:
  1. Sumit Kesarwani

    Post:782

    Points:3910
    What is the use of return statement?

     The return statement is associated with procedures (methods or functions). On executing the return statement, the system passes the control from the called procedure to the calling procedure. This return statement is used for two purposes :

    •        to return immediately to the caller of the currently executed code
    •         to return some value to the caller of the currently executed code.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!