foo example
This commit is contained in:
parent
c636edbb8b
commit
7a65bfaf26
22
c-basic/foo.c
Normal file
22
c-basic/foo.c
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int foo()
|
||||||
|
{
|
||||||
|
printf("I am foo\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
foo();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
In the written book it is foo() and main() and it returns this warning
|
||||||
|
~/Projects/hwpplayer1/c-course/c-basic $ gcc foo.c
|
||||||
|
foo.c:3:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
|
||||||
|
3 | foo()
|
||||||
|
| ^~~
|
||||||
|
foo.c:8:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
|
||||||
|
8 | main()
|
||||||
|
| ^~~~
|
||||||
|
**/
|
Loading…
x
Reference in New Issue
Block a user