Ajout des fichiers des séances précédentes
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,16 @@
|
||||
Question 1
|
||||
|
||||
[zohikoim@vm-zohikoim ~]$ cat bases.c
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(void) {
|
||||
printf("%d\n", 72);
|
||||
printf("%d\n", 0110);
|
||||
printf("%d\n", 0x48);
|
||||
return EXIT_SUCCESS;
|
||||
}[zohikoim@vm-zohikoim ~]$ gcc -ansi -pedantic bases.c
|
||||
[zohikoim@vm-zohikoim ~]$ ./a.out
|
||||
72
|
||||
72
|
||||
72
|
||||
@@ -0,0 +1,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(void) {
|
||||
printf("%c\n", "0" + 3 + 4);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(void) {
|
||||
printf("%c\n", 'a' - 32);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
/* premier programme */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main(void) {
|
||||
printf("Hello World!\n");
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
int main2(void) {
|
||||
printf("%c%c%c%c%c%c%c%c%c%c%c%c%c","H", "e", "l", "l", "o", " ", "W", "o", "r", "l", "d", "!", "\n");
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
Reference in New Issue
Block a user