DEV/DEV1.1/TP15/TP15_reponses.txt

32 lines
438 B
Plaintext
Raw Permalink Normal View History

2024-10-09 09:59:41 +02:00
------- TP15 : Chaînes de caractères -------
1.
2.
3.
# include <stdio.h>
# include <stdlib.h>
int main(int argc, char** argv){
int compteur;
compteur = 0;
for (; argc != 0; argc--) {
printf("%c ", argv[compteur][0]);
compteur++;
}
printf("\n");
}
4.
TO DO
# include <stdio.h>
# include <stdlib.h>
# include <string.h>
# define TAILLE 26
int main(int argc, char** argv){
printf("%d", (int) argv[0] * (int) argv[1]);
}