Last active
December 14, 2015 09:09
-
-
Save sampottinger/5062518 to your computer and use it in GitHub Desktop.
Shows how to slice arrays in C
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void slice_array(int * dest, int * source, int start_index, int end_index) | |
{ | |
memcpy(dest, source+start_index, (end_index-start_index)*sizeof(int)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment