This commit is contained in:
tth
2021-07-30 23:45:42 +02:00
parent fb0fbed34c
commit b40e73ba5c
6 changed files with 87 additions and 1 deletions

View File

@@ -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
View 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;
}

View File

@@ -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;
}