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
why IT?
Why is using C language
please provide me the type of questions or question pattern of bally.
what is the number of water, sand and cement required for moulding brick?
what is the diffeence between SQL and ORACLE?
Write the fetch cycle and execute cycle for following instructions:JMPNZ (jump to the given address if the accumulator not equal to zero) RET(return from a subroutine) ADB (add the contents of register B to the accumulator and save result in the accumulator).
How we calculate the recovery of steam as per coal in a boiler if we know the calorific value of coal?
what is elligibility criteria of hcl?
A short CI column of hollow circular section has projecting bracket carrying a load of 10 tonnes. The load line is off the column by 20cm. The external diameter of the column is 350mm and thickness of metal is 25 mm. Find the maximum stress intensity in the section.
how will u recieve idoc
Explain i.d.e. for visual c++?
how to avoid a class from getting inherited but respective class should be able to instantiate ?
Is there any difference between the concepts of encoding,decoding and encryption and decryption?
I am haning thousands emails in my send box (which i sended.) Now i want to send all these emails (Total in send box)to other by email. Can i send total emails at one time (Not sending each indivisually) by one comand; Please tell the steps..Thanks.
I am selected interview for computer sc.please give me some information how many types question asked in interview.my id is sumanadas10@gmail.com