The function ________ is used to copy one string to another in C.
- compare()
- length()
- strcpy()
- swap()
In C, the function strcpy() is used to copy one string to another. It takes two string arguments and copies the contents of the source string to the destination string until it encounters a null character.
Loading...
Related Quiz
- In C, a function pointer can be used to call a function without knowing its ________ at compile time.
- You are working on a software project in C++ that requires sorting a list of items in multiple ways. How could you leverage function overloading to achieve this?
- You are developing a program to manage the seating arrangement in a movie theater with rows and columns. How would you represent the seats using arrays?
- To access members of a structure using a pointer to that structure, the ________ operator is used.
- How can command line arguments be used to influence the flow of a program at runtime?