Difference between strdup and strcpy in c language?
Answer / 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 |
Explain work?
I attended an interview with CGI last week for network engineer and here are the questions that might help you guys who are going to attend interviews.
Tell us about your quality engineering experience?
How we can find out face expression ,what approach should be followed (like skin detection) ?
how bluetooth works?what is principle behind in it?
please tell me difference between router and cisco router
How can write a C program that shows All the prime number?
a simple compiled code is run on a C compiler as well as java virtual machine. which runs faster and y?
Why do sausages split lengthways, rather than around the circumference?
tell about ur self
3 Answers American Megatrends, CTS,
how to increase the water ring vacuum pump efficiency?
what is the effect of low frequency(say 48Hz) on TUrbo- Generator set when running for a prolonged period?
Civil Engineering (5086)
Mechanical Engineering (4456)
Electrical Engineering (16639)
Electronics Communications (3918)
Chemical Engineering (1095)
Aeronautical Engineering (239)
Bio Engineering (96)
Metallurgy (361)
Industrial Engineering (259)
Instrumentation (3014)
Automobile Engineering (332)
Mechatronics Engineering (97)
Marine Engineering (124)
Power Plant Engineering (172)
Textile Engineering (575)
Production Engineering (25)
Satellite Systems Engineering (106)
Engineering AllOther (1379)