0
why function initialisation [int main()] and variable defining [int sum;] are both the same command “int” ?
2 Respostas
+ 9
In int main(), int is return type of "main()" function.
In int sum;, int is data type of "sum" variable.
0
Int is not a command, it is a type (integer). In the main case, it must return an integer to send signals to the caller (usually the OS). In the variable case, it specifies how much memory should be allocated for that variable and how it will be read or written.