Switch to full style
For C/C++ coders discussions and solutions
Post a reply

what will return by void main()

Thu Feb 16, 2012 7:49 pm

Hi friends,
what is the default return type of main() in c/c++ and what it will return when we declared as void main() ?



Re: what will return by void main()

Fri Feb 17, 2012 4:19 pm

void means it will return nothing .

Re: what will return by void main()

Sat Feb 18, 2012 6:40 am

msi_333 wrote:void means it will return nothing .

r u sure?
then what is the status it will return to os?

Post a reply
  Related Posts  to : what will return by void main()
 Set scope on main window     -  
 argument type of a program's main() method     -  
 changing the background color for site main menu.     -  
 Show sidebar main menu with scroll down in the web page     -  
 pass parameters to main method args[] variables     -  
 main method and two static methods and loop until input zero     -  
 Function return more than one value     -  
 readLine() return value     -  
 return false; questions     -  
 Return all the keys of an array     -