How do you get a file extension (like .tiff) from a filename in C?
.tiff
Thanks!
You can use the strrchr function, which searches for the last occurrence of a character in a string, to find the final dot. From there, you can read off the rest of the string as the extension.
strrchr