Is there one?
It's a question of someone who is starting to program, but for example, if I declare this:
char cadena[11];
Why would you let me assign you a string that has 30 elements? Should not there be a memory overflow and show me weird things when pulling out the string with a printf?
To give an example:
void solicitarCadena(){
char cadena[11];
printf("\nIntroduce una cadena de 10 elementos como maximo:\n");
gets(cadena);
printf("%s",cadena);
}
In this example, even if you enter a chain of 50 elements, it shows it to me in an integrated way without giving any kind of problem.
Is the compiler I'm using (dev c / c ++) doing magic below to make it work?