Can't understand what is causing this
A bug in the code is causing this. This program attempts to modify a string literal, which is prohibited by the language rules.
You can fix it like so:
int main()
{
char s[] = "gateexam";
...
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…