+ 1
What else I can use in place of int main, l(like int,float,etc.) which work in my this code and in 'C' language
What else I can use in place of int main, l(like int,float,etc.) which work in my this code and in 'C' language https://sololearn.com/compiler-playground/cWEDkp986LaY/?ref=app
3 Antworten
+ 2
You should check
- the C language standard
- the compiler documentation
You can find a good summary here:
https://stackoverflow.com/questions/2108192/what-are-the-valid-signatures-for-cs-main-function
Every source is in agreement that the return type of the main function should be int.
+ 2
you don't have to alter int main(){}. It's just the entry point of your program. What's important is the contents inside it.
+ 1
Afaik int and void, void isn't commonly used now though.
Void meaning the program doesn't 'return' anything.
Int is used as a way to indicate the outcome of the program, 'return 0' meaning successfully executed and exited and any other number meaning that the program didn't execute successfully.