How can I get the character from the user in the console and then display it?

I wrote below code but it doesn't work and shows error after inputting the line

char Fname[20];
printf("Enter name:");
scanf_s("%19s", Fname);
Printf("%s\n",Fname);

      

Error: Exception thrown at 0x0F17DDf4

thanks for the help

+3


source to share





All Articles