Q
Qu?bec
How comes the for loop just printf 3 characters?
1 e
7 e
10 e
The string mixed by C is : J?an Pi?rr?
=========
fmt string is "Jean Pierre"
---------------
const char *fmt;
.....
strcpy(ligne, fmt);
....
for(i=0;i<11;i++){
for(j=0;j<65;j++){
if(alphabet[j] == fmt){
ligne = alphabet[65-j];
printf("%d %c\n", i, fmt);
break;
}
}
}
===
char alphabet[] = {
'0','1','2','3','4','5','6','7','8','9',
'A','B','C','D','E','F','G','H','I','J', 'K','L','M','N',
'O','P','Q','R','S','T','U','V','W','X','Y','Z', ' ',
'a','b','c','d','e','f','g','h','i','j','k','l','m','n',
'o','p','q','r','s','t','u','v','w','x','y','z', '_', '-'};
1 e
7 e
10 e
The string mixed by C is : J?an Pi?rr?
=========
fmt string is "Jean Pierre"
---------------
const char *fmt;
.....
strcpy(ligne, fmt);
....
for(i=0;i<11;i++){
for(j=0;j<65;j++){
if(alphabet[j] == fmt){
ligne = alphabet[65-j];
printf("%d %c\n", i, fmt);
break;
}
}
}
===
char alphabet[] = {
'0','1','2','3','4','5','6','7','8','9',
'A','B','C','D','E','F','G','H','I','J', 'K','L','M','N',
'O','P','Q','R','S','T','U','V','W','X','Y','Z', ' ',
'a','b','c','d','e','f','g','h','i','j','k','l','m','n',
'o','p','q','r','s','t','u','v','w','x','y','z', '_', '-'};