Hi, I'm just learning C and am using xCode for it (not sure if it matters). This code:
#include <stdio.h>
int main (int argc, const char * argv[]) {
int myInt;
myInt = 2;
myInt *= ( (3*4) / 2 ) - 9;
printf("myInt = %d", myInt);
return myInt;
}
Outputs this:
Session started at 2009-11-09 15:51:15 -0500.]
myInt = -6
The Debugger has exited with status 250.The Debugger has exited with status 250.
The printf is right, but what about return is
A) making it wrap under, and
B) show the results twice? (to clarify, if I put return 0;
, it only prints the "debugger has exited" line once, with the value as 0.)
Thanks!