On the first programs I compiled, like this:
Code:
#include <stdio.h>
int main()
{
printf("Hello world!\n");
getchar();
return(0);
}
there is a return function. However in this program I just compiled:
Code:
#include <stdio.h>
int main()
{
int x;
for (x = 0; x < 100; x++){
printf("%d\n", x);
}
getchar();
}
there is not a return function (is return a "function?") to tell the program that it completed successfully, and as I type this I'm thinking it's because the second program is a loop? Did I just answer my own question?
Thank you! haha