Hello C
This commit is contained in:
@@ -10,3 +10,8 @@ ex_curses: ex_curses.c Makefile
|
||||
thread-demo: thread-demo.c Makefile
|
||||
gcc -Wall -pthread $< -o $@
|
||||
|
||||
hello: hello.c Makefile
|
||||
gcc -Wall $< -o $@
|
||||
|
||||
arguments: arguments.c Makefile
|
||||
gcc -Wall $< -o $@
|
||||
|
||||
16
code/arguments.c
Normal file
16
code/arguments.c
Normal file
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* afficher les arguments.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int foo;
|
||||
|
||||
for (foo=0; foo<argc; foo++) {
|
||||
printf("%3d %s\n", foo, argv[foo]);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1,6 +1,11 @@
|
||||
/*
|
||||
* Hello, Sun.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
printf("Hello world.\n");
|
||||
printf("hello world.\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user