+ 1
Return in function main in Sololearn C course
In course of C some users questions about return different of 0 or without return don't cause effect, don't show error. This is of Sololearn platform for coding? I don't test in IDE's for computer recently, but i think that result in error. Anyone have this answer? Thanks for attention. Excuse my english. Below an example that a create for study this problem: https://code.sololearn.com/cmr113qk94Lh/?ref=app
1 Réponse
+ 8
Hello Walberto, this is a common question that had been discussed before. Please try to use the Search feature before posting a new question. What I have learned from previous responds to the subject is, compiler inserts a `return 0;` automatically if we didn't explicitly set what to return, but compiler only does this for main function - having the main return type as int.