I am having problems with the following code:
#include <stdio.h>
#include <string.h>
#include <conio.h>
int main()
{
char c[10];
printf("nombre\n");
scanf("%s",&c);
printf("%s",c);
}
The problem is that when entering the name and pressing Enter I get the following error message:
"x.exe has stopped working".
I have tried placing more libraries and exchanging char c[10]
for char *c
The same code was tested in borland (compiler of c and c ++) and there does not give me any problem, so the problem must be in visual studio.