plz explain the concept with examole
In c++ why only int main not void main
example where we can use void main
@Ds_aizen you cannot use void main, it is not allowed. main() function must have a return type of int only
why you cannot use void main, it is not allowed
@Ds_aizen its just the rules of the language, the return value is used for various purposes internally. Therefore you must have a return type of int for main function.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.