हिंदी

In what situation does a method return a value? - Computer Applications

Advertisements
Advertisements

प्रश्न

In what situation does a method return a value?

संक्षेप में उत्तर

उत्तर

When a method is defined to deliver an output to its caller program, it returns a value. 

Example: 

int factorial(int x)
         {
         }

According to the method specification above, this method returns an integer value. To return an integer value, include a return statement at the end of the method, as specified by the return type. 

shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 5: User - Defined Methods - EXERCISES [पृष्ठ ३३७]

APPEARS IN

अविचल Computer Applications [English] Class 10 ICSE
अध्याय 5 User - Defined Methods
EXERCISES | Q VI. 8. | पृष्ठ ३३७
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×