0

C return

What if in the end of main function of a c program I return instead of 0, some other integer (for example 139)

18th Jun 2019, 12:55 PM
Lighton
Lighton - avatar
6 Answers
+ 3
Yes,you can do it ,return 0 or return 139 or some other integer number is only a confirmation for the operating system that is your program will be run successfully, that's it
18th Jun 2019, 1:05 PM
Pulkit soni
Pulkit soni - avatar
+ 2
And if I return 139, program will be run successfully?
18th Jun 2019, 1:10 PM
Lighton
Lighton - avatar
+ 1
Yes,
18th Jun 2019, 1:11 PM
Pulkit soni
Pulkit soni - avatar
+ 1
You can return any integer number
18th Jun 2019, 1:11 PM
Pulkit soni
Pulkit soni - avatar
0
Check my profile ,I have coded about your problem https://code.sololearn.com/cUSOrU6gqLw6/?ref=app
18th Jun 2019, 1:12 PM
Pulkit soni
Pulkit soni - avatar
0
Thank you,I understand! If you can, ask my new question about constants.
18th Jun 2019, 1:14 PM
Lighton
Lighton - avatar