Is it possible to declare the main() as void. Will this declaration of main function as void give me error? Someone who has experienced throw highlight on this.
Printable View
Is it possible to declare the main() as void. Will this declaration of main function as void give me error? Someone who has experienced throw highlight on this.
It is not possible to declare main() function return value as void. This is because the default return value of main function in C is int and if one declares it as void it results in mismatch in declaration and so cannot be declared as void.
It was a nice explanation so is it that if one declare void in main() the program would throw redeclaration error that is a compile time error.
void main() works in the TC compiler but not in cc. why?