YourThe condition of your for loop is wrong. It should be i < start + count, so that your for loop have to be:
for (i = start; i < start + count; i++) { ... } to count in your case e.g. 3, 4, 5, 6 until the end (6 will not be executed) is reached, also note the < is used and not the <=.
Output will be: "act" in your case.
You can substitute your for loop where you copy every single character by strncpy which is described at this manpage (synoptics: char *strncpy(char *dest, const char *src, size_t n);).
It would be like this:
strncpy(result, str + start, count); result[start + count] = '\0'; Further you should think of making your function robust against buffer overflows of the input (str) and output (result) string by using strlen on the input buffer and passing the buffer size of the output buffer to the function and checking these lengths against start and count. Another possibility would be to allocate the output buffer dynamically with the right size but nevertheless the input buffer should be checked.