Advertisement
Guest User

Untitled

a guest
Jan 25th, 2015
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. #include <stdio.h> /* printf */
  2. #include <string.h> /* strrchr */
  3.  
  4. ext = strrchr(filename, '.');
  5. if (!ext) {
  6. /* no extension */
  7. } else {
  8. printf("extension is %s\n", ext + 1);
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement