Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h> /* printf */
- #include <string.h> /* strrchr */
- ext = strrchr(filename, '.');
- if (!ext) {
- /* no extension */
- } else {
- printf("extension is %s\n", ext + 1);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement