+ 3

What is the difference of void main in int main in c program.

Void main() and int main()

23rd Oct 2019, 3:40 PM
Aerl Hood
3 Respuestas
+ 5
Void main() indicates that main() will not return any value Int main() indicates that main() will return an integer value
23rd Oct 2019, 3:44 PM
Arsenic
Arsenic - avatar
+ 1
Thanks!
23rd Oct 2019, 3:48 PM
Aerl Hood
+ 1
Hello, void, int, double etc, are the datatypes and used as a return type of any function or methods. the main difference between int main() and void main() is the return type. int main() method will return int value while void main() method will return nothing. You can also use the double or float as a return type.
25th Oct 2019, 5:01 AM
Ishan Shah
Ishan Shah - avatar