Why there is use ' int' before 'main'? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why there is use ' int' before 'main'?

4th Aug 2016, 10:32 AM
Hemil Kothari
Hemil Kothari - avatar
2 Answers
0
int main() returns an int(0) void main() returns nothing double main() returns a double(0.00) char main() returns a char('a')
4th Aug 2016, 10:42 AM
Suhail Pappu
Suhail Pappu - avatar
0
Cause you need to return a zero a the end of your program in order to tell the computer that everything in your code executed as expected... it's like a standard...
4th Aug 2016, 11:15 AM
Nelson Urbina
Nelson Urbina - avatar