Interview Questions Answers.ORG
Interviewer And Interviewee Guide
Interviews
Quizzes
Home
Quizzes
Interviews C Programming Interviews:C FunctionsC PointersC Preprocessor
Copyright © 2018. All Rights Reserved
C Pointers Interview Question:
What is the difference between strcpy() and memcpy() function?
Submitted by: AdministratorThe following are the differences between strcpy() and memcpy():
- memcpy() copies specific number of bytes from source to destinatio in RAM, where as strcpy() copies a constant / string into another string.
- memcpy() works on fixed length of arbitrary data, where as strcpy() works on null-terminated strings and it has no length limitations.
- memcpy() is used to copy the exact amount of data, whereas strcpy() is used of copy variable-length null terminated strings.
Submitted by: Administrator
- memcpy() copies specific number of bytes from source to destinatio in RAM, where as strcpy() copies a constant / string into another string.
- memcpy() works on fixed length of arbitrary data, where as strcpy() works on null-terminated strings and it has no length limitations.
- memcpy() is used to copy the exact amount of data, whereas strcpy() is used of copy variable-length null terminated strings.
Submitted by: Administrator
Copyright 2007-2025 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.

https://InterviewQuestionsAnswers.ORG.
