Return type | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Return type

what is the "return 0" is written in this way --> "retutn ()" like in c we write" getch()"

16th Apr 2017, 7:43 AM
Shreya Parmar
Shreya Parmar - avatar
4 Answers
+ 12
There is no built-in function such as return(). The return keyword is reserved only for one purpose.
16th Apr 2017, 7:54 AM
Hatsy Rei
Hatsy Rei - avatar
+ 11
Those are totally different things. The return statement is used to return values to where the function is called. Main function returns value to the operating system. Function getch() is using to hold the console output screen until the user presses any key.
16th Apr 2017, 7:48 AM
Hatsy Rei
Hatsy Rei - avatar
+ 2
oh yeah i recollect it... ty for it but what if i want to use return () instead of return 0...then how vll i use it or i can't use it
16th Apr 2017, 7:49 AM
Shreya Parmar
Shreya Parmar - avatar
+ 1
Ohk
16th Apr 2017, 7:55 AM
Shreya Parmar
Shreya Parmar - avatar