on-internet
← Community

What should main() return in C and C++?

Stack Overflow ·

What is the correct (most efficient) way to define the main() function in C and C++ — int main() or void main() — and why? And how about the arguments? If int main() then return 1 or return 0?

Comments

Sign in or sign up to comment and upvote.

No comments yet.