strcat segmentation fault

前端 未结 7 1874
后悔当初
后悔当初 2021-01-24 01:50

The second call to strcat here is generating a segmentation fault, why?

#include 
#include
#include 

        
7条回答
  •  长发绾君心
    2021-01-24 01:55

    Your gets call could have added sufficient characters already to cause undefined behavior at about anytime.

提交回复
热议问题