Which of the following is the right syntax to copy n characters from the object pointed to by s2 into the object pointed to by s1?

Mỹ An

New member
Which of the following is the right syntax to copy n characters from the object pointed to by s2 into the object pointed to by s1?
A. void *memcpy(void *s1,const void *s2,size_t n);
B. void *memcpy(void *s2, const void *s1, size_t n);
C. void memcpy(void *s1,const void *s2, size_t n);
D. void memcpy(void *s2,const void *s1,size_t n);
 
Answer: a
Explanation: The memcpy() function copies n characters from the object pointed to by s2 into the object pointed to by s1. If copying takes place between objects that overlap, the behavior is undefined.
 

Tìm kiếm

Back
Top