Return | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 1

Return

What does return mean I donÔÇÖt really get it and what happens if you put the return value to 1

11th Aug 2018, 9:27 PM
Ilyane
3 Antworten
+ 2
Return was created to return a value. For example you can created a function: int count() { int result=1+2; return result; } int number=count() ; //number = 3
11th Aug 2018, 9:38 PM
Th├ęophile
Th├ęophile - avatar
+ 1
In main() {}, return 0 is there to say that your code was correctly executed. But you can change the value.
11th Aug 2018, 9:40 PM
Th├ęophile
Th├ęophile - avatar
0
thanks
11th Aug 2018, 9:39 PM
Ilyane