0

what is really main(void)?

any help

26th Aug 2018, 11:13 AM
Rajesh Sharma
Rajesh Sharma - avatar
2 Respuestas
+ 1
Rajesh Sharma it's similar to main() for c++... in c , main(void) differs from main()... try following in both c and c++ : void dosomething() {} // define function dosomething (5); // function call in c++, it is error where as in c, it will compile..because in c, it is considered that you should pass void as argument while definition of function if it is supposed to call without argument.... p.s. : if you would define your function as void dosomething (void), your function call will result into error in c also
26th Aug 2018, 12:04 PM
Ketan Lalcheta
Ketan Lalcheta - avatar
0
that never returns the value...
26th Aug 2018, 11:14 AM
Rajesh Sharma
Rajesh Sharma - avatar