char subbuff[5];
memcpy( subbuff, &buff[10], 4 );
subbuff[4] = '\0';
Job done 🙂
More Related Contents:
- Get index of substring
- Find the Biggest Number in C, BUT with characters
- isnt everything where it should be, why the segmentation fault?
- How to write character to an array of pointers in C? [closed]
- Malloc , Realloc , Memset : Struct pointers , arrays of char, int
- returning string in C function [closed]
- What is the difference between char s[] and char *s?
- Is char signed or unsigned by default?
- Are there machines, where sizeof(char) != 1, or at least CHAR_BIT > 8?
- Convert hex string (char []) to int?
- What is the fastest substring search algorithm?
- Is char guaranteed to be exactly 8-bit long? [duplicate]
- How to copy a char array in C?
- Is CHAR_BIT ever > 8?
- How to convert char to integer in C? [duplicate]
- C char array initialization
- unsigned int and signed char comparison
- C: correct usage of strtok_r
- Return char[]/string from a function [duplicate]
- What is the proper way of implementing a good “itoa()” function?
- Where in memory are string literals ? stack / heap? [duplicate]
- Why does char* cause undefined behaviour while char[] doesn’t?
- Conversion of Char to Binary in C
- Hex to char array in C
- why sizeof(‘a’) is 4 in C? [duplicate]
- C split a char array into different variables
- problems with char array = char array
- Creating a FORTRAN interface to a C function that returns a char*
- Assigning char array a value in C
- How many chars can be in a char array?