Re: Programming Puzzle
Mabden wrote:
[color=blue]
> C:\TEMP>type test.c
> #include <stdio.h>
>
> int main(void) {
> int *foo = NULL;
>
> fprintf(stdout, "%i\n", *foo);
> }
>
>
> C:\TEMP>cl -c test.c
> Microsoft (R) C/C++ Optimizing Compiler Version 8.00c
> Copyright (c) Microsoft Corp 1984-1993. All rights reserved.
>
> test.c
> test.c(7) : warning C4035: 'main' : no return value[/color]
In C90 a return statement is required, in C99 it is not.
Regards,
Ioannis Vranos
Mabden wrote:
[color=blue]
> C:\TEMP>type test.c
> #include <stdio.h>
>
> int main(void) {
> int *foo = NULL;
>
> fprintf(stdout, "%i\n", *foo);
> }
>
>
> C:\TEMP>cl -c test.c
> Microsoft (R) C/C++ Optimizing Compiler Version 8.00c
> Copyright (c) Microsoft Corp 1984-1993. All rights reserved.
>
> test.c
> test.c(7) : warning C4035: 'main' : no return value[/color]
In C90 a return statement is required, in C99 it is not.
Regards,
Ioannis Vranos
Comment