what is the difference between strcpy() and memcpy() function?

Answer Posted / manoj

memcpy can copy null bytes also if the size of memory is
given
strcpy stops after the first null byte.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the different bitween abap and abap-hr?

1952


What are the 5 types of organizational structures?

806


Explain how can I pad a string to a known length?

914


code for quick sort?

1833


a direct address that identifies a location by means of its displacement from a base address or segment a) absolute address b) relative address c) relative mode d) absolute mode

902


Write the control statements in C language

891


Can we declare a function inside a function in c?

827


What is the process to generate random numbers in c programming language?

901


how many errors in c explain deply

1848


Is there a way to have non-constant case labels (i.e. Ranges or arbitrary expressions)?

852


How can you call a function, given its name as a string?

930


Explain what is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?

858


What is NULL pointer?

879


Explain how can you be sure that a program follows the ansi c standard?

1154


What is the purpose of & in scanf?

861