I have this code:
include <stdio.h>
define TAM 64
int main(int argc, const char **argv) {
char cadena[TAM] = {0};
while (fgets(cadena, sizeof(cadena), stdin) != NULL)
printf("%s\n", cadena);
}
When I run it in the GNU / LiNUX console and enter characters like "á" and then print it, I print it correctly. But if string is an array of char, that is, the range of values is [2 ^ (8-1), 2 ^ (8-1)] = [-128, 127] , with which should not be able to store and visualize the tilde, no? Because it is ASCII and we should use unsigned char
.
Thanks