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
how do we calculate physical address if logical address is given in the question?
How do you reset or reseed the IDENTITY column?
Write a program in āCā language that will perform the following operation on static stack. 1. push 2. pop 3. Display 4. Exit Create separate functions for each operation. The push() should accept one argument of structure type and will not return any thing. The pop() function will not receive any argument & return structure type value. The stack & top must be declare as external variable. Each element of stack will contain the following information Roll No, Std Name, Course. Use do-while loop & switch case for generating the above menu. The format of the output should is given below: S.No. Roll No. Student Name Course 1 cse01 Anil Singh B.Tech
What are the main assumptions that we make when we model potential flow?
find the salary of an employee where employee number is known
How to score well in examination of MCA(engg) december 2012? please reply soon........
What does "stdafx"header file do?
SQL How can make delete and insert in one query
briefly explain about your project? please tell me about this answer . my current project is ERP domain web based application.please please help me
Write a program to print Pattern 1) If user enters 3 1 2*3 4*5*6 4*5*6 2*3 1 2) If user enters 4 1 2*3 4*5*6 7*8*9*10 7*8*9*10 4*5*6 2*3 1
how strcpy usingrecursive function
how to prepare for an written exam for any type of company?
explain in detail about life cycle of thread
how the parting surface is selected in injection mould
4. What is your typical way of dealing with conflict?