I have the below error: (line 8)
Exception thrown at 0x7928E63C (ucrtbased.dll) in C_1.exe: 0xC0000005: Access violation writing location 0x00BA0000. occurred
What input values are you entering that breaks it? You're probably overflowing the arrays. Don't do that. Don't try to store more characters in the arrays than they have space for.
main.cpp(9): warning C4473: 'scanf_s' : not enough arguments passed for format string
main.cpp(9): note: placeholders and their parameters expect 2 variadic arguments, but 1 were provided
main.cpp(9): note: the missing variadic argument 2 is required by format string '%s'
main.cpp(9): note: this argument is used as a buffer size
main.cpp(14): warning C4473: 'scanf_s' : not enough arguments passed for format string
main.cpp(14): note: placeholders and their parameters expect 2 variadic arguments, but 1 were provided
main.cpp(14): note: the missing variadic argument 2 is required by format string '%s'
VS diagnoses it fine (although I'm compiling in C++).