I’m looking for a C function similar to the C# Array.Copy().
I found memcpy() only, but I need to copy from specific index too.
I’m looking for a C function similar to the C# Array.Copy(). I found memcpy()
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you have an array like this:
And you want to copy elements indexed 19-29 (the 20th through 30th elements).
Then you do:
Note: this code-segment makes no provision for initializing
myArray, or allocating memory todest