return Statement in C++ - Explained with Examples
The return statement in C++ is a jump statement used to terminate the execution of a function and transfer control back to the calling function. It can also return a value from a function to the calling statement. The return statement is commonly used in user-defined functions and the main() function. C++ में return statement एक Jump Statement है, जिसका उपयोग function का execution समाप्त करके control को calling function में वापस भेजने के लिए किया जाता है। इसके माध्यम से function किसी value को calling statement में return भी कर सकता है। return statement का उपयोग मुख्य रूप से user-defined functions और main() function में किया जाता है। 1. Syntax of return Statement (सिंटैक्स) The return statement has two common forms. return statement के दो सामान्य forms होते हैं। 1. Return without a value return; This form is used in functions having the return type void . इस form का उपयोग void return type वाले functions में किया जाता है। 2. Return with a value return expression; This form re...