C strcpy() - evil?

前端 未结 17 1460
梦毁少年i
梦毁少年i 2020-12-23 10:50

Some people seem to think that C\'s strcpy() function is bad or evil. While I admit that it\'s usually better to use strncpy() in order to avoid bu

17条回答
  •  长情又很酷
    2020-12-23 11:10

    strlen finds upto last null terminating place.

    But in reality buffers are not null terminated.

    that's why people use different functions.

提交回复
热议问题