Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

how do we calculate physical address if logical address is given in the question?

2908


How do you reset or reseed the IDENTITY column?

2031


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

1894


What are the main assumptions that we make when we model potential flow?

1049


find the salary of an employee where employee number is known

1915


How to score well in examination of MCA(engg) december 2012? please reply soon........

1805


What does "stdafx"header file do?

1891


SQL How can make delete and insert in one query

1857


briefly explain about your project? please tell me about this answer . my current project is ERP domain web based application.please please help me

2054


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

2895


how strcpy usingrecursive function

2031


how to prepare for an written exam for any type of company?

2415


explain in detail about life cycle of thread

2261


how the parting surface is selected in injection mould

1945


4. What is your typical way of dealing with conflict?

1926