After I formatted the \"direccion\"\'s scanf in function \"leerdatos\", it skip the \"nro_corredor\" in the second \'for\' loop.
I\'ve already read the related quest
One other issue you are faced with is the need to flush the input buffer (stdin) after calling scanf. As chux noted, scanf does not consume the newline '\n' leaving it in the input buffer to be read as the next character. It is always good to flush the input buffer after each use of scanf, especially when scanf is called multiple times. A simple way to flush the input buffer is:
int c = 0; /* test int for getchar */
...
scanf("%d",&cp);
do { c=getchar(); } while ( c != '\n'); /* flush input buffer */
Note: fflushf does not clear characters remaining in stdin.