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
User contributions licensed under CC BY-SA 3.0