1)What is return value ? 2) why it's need 3)why some programmes doesn't need that? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 2

1)What is return value ? 2) why it's need 3)why some programmes doesn't need that?

13th May 2020, 1:43 PM
PRAVEEN
PRAVEEN - avatar
9 Answers
+ 1
1)return value is used to return a value if it's variable in the function is called 2)it's needed to return a variable value 3)it's not needed in the void function Whereas it's needed while using int declared function and other datatypes declared functions to return value when the function is called. Hope u understood. Thank you.
15th May 2020, 5:30 AM
Vibha k 1TJ16CS113
Vibha k 1TJ16CS113 - avatar
+ 3
1). The main job of a function is to execute any particular task and return the result or value which is called return value. So the computed result returned by the function is called return value. 2). It is very important so the computed values can be retrieved and data can flow between different functions through the programme. 3).Some function* don't need that because they don't need to return any value to the calling function.
13th May 2020, 2:14 PM
Pradeep Kumar Prajapati
Pradeep Kumar Prajapati - avatar
+ 1
It is used for function that need to give back a value after some computations, for example : int mult(int a, int b) { return a*b;} And we can do : int a =3, b=4; int c = mult(a, b); // now c = 12
13th May 2020, 2:14 PM
Telo Philippe
Telo Philippe - avatar
+ 1
What is class
13th May 2020, 2:29 PM
PRAVEEN
PRAVEEN - avatar
0
What is an identifier
13th May 2020, 2:13 PM
PRAVEEN
PRAVEEN - avatar
0
For example variables or function names
13th May 2020, 2:16 PM
Telo Philippe
Telo Philippe - avatar
0
What is static practically
13th May 2020, 2:25 PM
PRAVEEN
PRAVEEN - avatar
0
🤔🤔🤔
14th May 2020, 11:05 PM
SpaghettDev
SpaghettDev - avatar
- 2
Wadie Stephen Please use the discussion section for asking programming related questions only. Continued spamming after this warning. Could result in account deletion. Thanks!
14th May 2020, 8:10 PM
Wadie Stephen
Wadie Stephen - avatar