0

Is it necessary to write void main(void) ?

10th Dec 2017, 4:26 AM
simran raghuvansh
simran raghuvansh - avatar
5 Réponses
10th Dec 2017, 4:29 AM
Hatsy Rei
Hatsy Rei - avatar
+ 10
No, as the default signature for main is : int main(char argc, char** argv) { } But, you may use : int main() { } Other versions are not allowed. Eg char main(), string main(), etc. in C++.
10th Dec 2017, 4:28 AM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar
+ 7
no
10th Dec 2017, 5:10 AM
chris
chris - avatar
+ 2
no need
10th Dec 2017, 3:23 PM
jitendra maurya
jitendra maurya - avatar