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.
Loading...
Related Quiz
- When a value is passed to a function by value, what is passed to the function?
- You are tasked with optimizing a C program that manipulates large strings. What standard library functions might be critical to review for potential performance bottlenecks?
- In C++, what is function overloading?
- The ________ statement in C is used to execute a block of code only when a specific condition is true.
- A pointer to a function in C is declared using the syntax ________.