+ 2

The keyword "INT" seems to be used to define both Integers and Function names. Is this right?

18th Jul 2017, 4:42 PM
Richard Appleton
Richard Appleton - avatar
8 ответов
0
Not quite right, the keyword int is always referring to type. int a = 1; --- The type of the variable a is an integer int b(value){ return value+1; --- The return type of this function will be an integer } int c = b(a); --- The return of function b will be saved into integer c
18th Jul 2017, 5:20 PM
S C
+ 3
You have int as a value type, and you also have int as a return type. When you see it on a function, rather than void, then you know its return type is int.
18th Jul 2017, 4:44 PM
AgentSmith
+ 1
yes
18th Jul 2017, 4:45 PM
‎ ‏‏‎Anonymous Guy
+ 1
int main(){ return 0; } This also returns an integer
18th Jul 2017, 5:43 PM
S C
0
Great Thank you. I was worried I had missed something!! :-)
18th Jul 2017, 4:46 PM
Richard Appleton
Richard Appleton - avatar
0
I was thinking of the INT Main command too
18th Jul 2017, 5:25 PM
Richard Appleton
Richard Appleton - avatar
0
I see. Thank you.
18th Jul 2017, 6:04 PM
Richard Appleton
Richard Appleton - avatar