c - what is wrong with this code snippet -
Friends, here is the implementation of memset () , although I have been told that one in the code The logical mistake can you help me find it?
I think a double indicator for the target string should be passed to this function, passing the address of the indicator variable and not the pointers only.
I am receiving "Access violation" when I execute the code in MS VC ++ IDE.
Copy the first n characters of the 'C' library function Definition of Menset
Zero * S, char c, size_t n) s. Return s zero * mammate (four * s, four c, size_t n) {size_t i; For (i = 0; i & lt; n; i ++, s ++) {* s = c; } Return S; }
There are several problems with this.
zero * mammate (four * s, four c, size_t n) {size_t i; For (i = 0; i & lt; n; i ++, s ++) / * increase means that you * / {/ * original value * / * s = c; Ignore the use of / * S [I] = C S * /} returns S; / * This should probably return an artist to zero * /}
Comments
Post a Comment