Difference between strdup and strcpy in c language?
Answer Posted / kalai
strcpy - copy a string to a location YOU created (you create the location, make sure that the source string will have enough room there and afterwards use strcpy to copy)
strdup - copy a string to a location that will be created by the function. The function will allocate space, make sure that your string will fit there and copy the string. Will return a pointer to the created area.
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
can any one please tell me what is mean by back papers,back log,historical standing ????????? this mean history of arrears is it correct or not.........
wats the difference between RS latch using NAND n NOR gate? which is to be preffered?
what is difference between server 2008R1 and 2008 server R2?
how many E1's in pasolink and ipasolink?
AD backups and restoration
tell me the e book for data structure (basic)
i want questions only on code part like general logics in c and java
program for inter process communicatin using message sharing in unix c
Explain Belady's Anomaly.
what do you mean by CPU register?
Why did they used to make the mill chimneys so tall?
what is the difference betweeen far pointer and near pointer
why IT?
What is the procedure for taking leave while detecting Epf and Esi?
i have applied for junior engg. signal II please send me questions papers for it