Answer Posted / rekha
"memmove" can safely handle the situation where the source
string overlaps the destination string
an example
ptr = memmove( s1, s2, N );
"memmove" copies exactly N characters from the string "s2"
into the area of memory pointed to by "s1". Unlike the
function "strncpy", "memmove" does not check for the
terminating '\0' of string "s2"; it simply copies N
characters. It does not put a terminating '\0' on the end of
string "s1".
Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
When should you not use a type cast?
List the different types of c tokens?
Explain how do you sort filenames in a directory?
Can you write the algorithm for Queue?
Why is not a pointer null after calling free?
Why can’t constant values be used to define an array’s initial size?
Ow can I insert or delete a line (or record) in the middle of a file?
What is difference between structure and union in c?
What is the best organizational structure?
What is difference between function overloading and operator overloading?
Explain which function in c can be used to append a string to another string?
Differentiate between new and malloc(), delete and free() ?
Why do some versions of toupper act strangely if given an upper-case letter?
Are local variables initialized to zero by default in c?
Can we access array using pointer in c language?