0

what is the difference between: main( ),int main( ),void main( ),main void( ),void main(void),into main(void) ?

27th Jul 2016, 6:51 AM
vishal khandelwal
vishal khandelwal - avatar
2 Answers
+ 2
Main() and main void() are not valid statements. int main() returns an integer value from main to os. Void main() returns nothing from the main to os. void main(void) doesnt take any arguments and returns nothing back to the os. int main(void) doesnt take any arguments but returns a integer back to the os
27th Jul 2016, 7:03 AM
chaitanya guruprasad
chaitanya guruprasad - avatar
0
According to c++11 ISO main must be type integer and can accept two values or no values. The permitted definitions are 1) int main (void) {} or 2) int main (int argc, char *argv []){}
27th Jul 2016, 8:23 AM
pasquale napolitano
pasquale napolitano - avatar