how to handle the following exception so that my code runs smoothly?

0

I tried doing this program about LL1 parsing and every time I input a string I get interrupted by the exception given below. How do I overcome this?

when the input is given , program breaks due to the following exception

Exception thrown at 0x5357D4EC (ucrtbased.dll) in Project1.exe: 0xC0000005: Access violation writing location 0x00FDB000.

char s[20];

printf("enter input\n"); 

scanf_s("%s", s); //exception occurs here

strcat_s(s, "$"); 

n = strlen(s);

P.S. I'm using Visual Studio 2017

c
exception
visual-studio-2017
asked on Stack Overflow May 10, 2019 by Archita Vasuki • edited May 10, 2019 by boski

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0