This is a discussion on string copy (strcpy) and a memory copy (memcpy) within the C and C++ Programming forums, part of the Software Development category; Hi Guys can you brief about What is the difference between a string copy (strcpy) and a memory copy (memcpy)? ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| hi, strcpy() works on null-terminated strings, and has no length limitations; memcpy() works on arbitrary data of a given fixed length... Aside from that, they both preform the same basic function: shifting data around in memory... But, you use memcpy() when you want to copy an exact amount of data (possibly containing embedded null chars) from one location to another, and strcpy() when you want to copy a variable-length null-terminated C string from one location to another... |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| copy information from $_SESSION when timeout.? | saravanan | PHP Programming | 0 | 03-19-2008 09:24 PM |
| copy information from HttpSession when timeout.? | saravanan | Java Server Pages (JSP) | 0 | 03-19-2008 09:22 PM |
| disable COPY/Paste function on a textbox | oxygen | C# Programming | 10 | 11-22-2007 04:45 AM |
| How can I copy just just the letters and only one of each from one form field to anot | itbarota | HTML, CSS and Javascript Coding Techniques | 1 | 10-29-2007 08:19 AM |
| Copy-Write issues | simplesabita | Software Testing | 1 | 09-06-2007 12:50 AM |