I recently picked up K&R the second edition to learn C. However on the first program, a simple hello world. It is giving me this compile issue
hello.c:3:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
main()
^
1 warning generated.
My code is
#include <stdio.h>
main()
{
printf("Hello world\n");
}
and I'm compiling it by going into the folder where this program is located and using gcc hello.c -o hello