+ 1

What I put with main viod or int

27th Jan 2018, 7:46 AM
Karan Rajput
Karan Rajput - avatar
4 Answers
+ 4
when you use void, it means you don't want anything returned from the function. while an int return may be a result of calculation in the function, or indicate the status when it returning, such as an error number or something else that can tell you what has happened when the function executing.
27th Jan 2018, 7:49 AM
Scooby
Scooby - avatar
+ 1
remember that most compiler don't support void main(),only some old compilers. you should use int main()
27th Jan 2018, 9:04 AM
shobhit
shobhit - avatar
0
int main() is a STANDARD. But for function call used name (in C) or name and arguments types (in C++), not return value types. So many systems will be work if you write void main().
27th Jan 2018, 9:19 AM
Š’Š°ŃŠøŠ»ŠøŠ¹ Š”Š°Š²ŠµŠ»ŃŒŠµŠ²
Š’Š°ŃŠøŠ»ŠøŠ¹ Š”Š°Š²ŠµŠ»ŃŒŠµŠ² - avatar