Top "Strcpy" questions

The C standard library function, "strcpy()," is used to copy non-overlapping, null-terminated strings.

strcpy() return value

A lot of the functions from the standard C library, especially the ones for string manipulation, and most notably strcpy(), …

c function strcpy
C - why is strcpy() necessary

Can someone please explain to me why strcpy() is necessary to assign strings to character arrays, such as in the …

c string strcpy
strcpy_s not working with gcc

I have a C++11 project, and I added some strcpy_s method calls. This works on windows, but when compiling …

c++ c++11 gcc strcpy tr24731
Does a string created with 'strcpy' need to be freed?

Does a string created with 'strcpy' need to be freed? And how to free it? Edit: The destination is allocated …

c strcpy
Is memcpy() usually faster than strcpy()?

Is memcpy() usually faster than strcpy() (on most real platforms)? (I assume that size of the string is known.) If …

c performance x86 memcpy strcpy
strcpy() and arrays of strings

I need to store the input from a user into an array of strings. #include <stdlib.h> #include &…

c arrays string pointers strcpy
Comparing two strings, problems with strcmp

I'm trying to check if the line read from stdin begins with "login:" but strcmp does not seem to work. …

c strcmp strcpy
Segmentation fault around strcpy?

I know that you will rap me over the knuckles but. Why does it make Segmentation fault char* cmd; strcpy(…

c segmentation-fault strcpy
warning: incompatible implicit declaration of built-in function 'strlen' and 'strcpy'

I just finnished my hangman game and as a last step I am doing some code cleanup and optimization, but …

c warnings strcpy strlen
strcpy when dest buffer is smaller than src buffer

I am trying to understand the difference/disadvantages of strcpy and strncpy. Can somebody please help: void main() { char src[] = "…

c string buffer-overflow strcpy