+ 1

What is the difference between the two types of int

You declare a program with int main() But you can define a variable as an integer int a What's the difference

8th Feb 2017, 12:21 PM
Chase
2 Respostas
+ 6
main() is a *function* of return type int in which your program is executed. a (as in your example) is an integer *variable*.
8th Feb 2017, 12:30 PM
Hatsy Rei
Hatsy Rei - avatar
+ 1
int main just means that the return type of the whole program is in integer, hence why return 0; is at the end of all programs
8th Feb 2017, 12:25 PM
Aaron
Aaron - avatar