What is the purpose of the strcpy function in C?

  • Allocates memory for a new string
  • Calculates the length of a string
  • Compares two strings
  • Copies one string to another
The strcpy function in C is used to copy one string into another. It does not calculate the length, compare strings, or allocate memory.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *