difference between memcpy and strcpy

Answer Posted / swetcha

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

Is This Answer Correct ?    31 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is c language & why it is used?

568


What is volatile variable in c?

649


I came across some code that puts a (void) cast before each call to printf. Why?

663


write an algorithm to display a square matrix.

2213


Can we change the value of static variable in c?

550






What is call by reference in functions?

548


What is adt in c programming?

598


What is structure pointer in c?

564


Explain threaded binary trees?

668


Write a function stroverlap that takes (at least) two strings, and concatenates them, but does not duplicate any overlap. You only need to worry about overlaps between the end of the first string and the beginning of the second string. Examples: batman, manonthemoon = batmanonthemoon batmmamaman, mamamanonthemoon = batmmamamanonthemoon bat, man = batman batman, batman = batman batman, menonthemoon = batmanmenonthemoon

1726


What is d'n in c?

622


How many levels of pointers have?

583


Are the outer parentheses in return statements really optional?

566


Badboy is defined who has ALL the following properties: Does not have a girlfriend and is not married. He is not more than 23 years old. The middle name should be "Singh" The last name should have more than 4 characters. The character 'a' should appear in the last name at least two times. The name of one of his brothers should be "Ram" Write a method: boolean isBadBoy(boolean hasGirlFriend , boolean isMarried, int age , String middleName , String lastName , String[] brotherName); isHaveGirlFriend is true if the person has a girlfriend isMarried is true if the person is married age is the age of the person middleName is the middle name of the person lastName is the last name of the person brotherName is the array of the names of his brothers

1414


What is the difference between memcpy and memmove?

590