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 are the parts of c program?

842


what value is returned to operating system after program execution?

1825


What is null character in c?

870


What is pre-emptive data structure and explain it with example?

3476


Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]

836


Write a C program to count the number of email on text

1658


What is the main difference between calloc () and malloc ()?

838


What is const and volatile in c?

792


What is chain pointer in c?

781


Explain the use of #pragma exit?

912


Write a c program to demonstrate character and string constants?

1915


What are multibyte characters?

850


How are variables declared in c?

840


What 'lex' does?

930


#include #include struct stu { int i; char j; }; union uni { int i; char j; }; void main() { int j,k; clrscr(); struct stu s; j=sizeof(s); printf("%d",j); union uni u; k=sizeof(u); printf("%d",k); getch(); } what is value of j and k.

5780