Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- int main (void)
- {
- char extention[] = "this string.css file";
- char* ptr = strchr(extention,'.');
- printf("%s\n",extention);
- char* needle = strrchr(extention,' ');
- char array[needle - ptr + 1];
- strncpy(array,ptr,needle - ptr);
- printf("%s\n",array);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement