--- In [email protected], kathir resh <[EMAIL PROTECTED]> wrote: > > how to view what does main returns (ie 0 success flag) > > #include<stdio.h> > void main() > { > printf("godisgreat"); > }
Operating system dependent. An example in Linux:
Program file answer.c:
int main(void)
{
return 42;
}
Compile the program:
> gcc answer.c -o answer
Run it:
> answer
Display the program's return value:
> echo $status
42
John
