Implementing a string copy function in C

前端 未结 9 1878
谎友^
谎友^ 2020-12-20 00:57

At a recent job interview, I was asked to implement my own string copy function. I managed to write code that I believe works to an extent. However, when I returned home to

9条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-20 01:44

    In general it's always a good idea to have const modifier where it's possible, for example for the source parameter.

提交回复
热议问题