how do i find the parent directory of ".." in C : I am iterating over all files in a folder. however if I encounter ".." I want to find it's parent directory. for example  If current dir is **user/doc/..**  I want to be able to get **user/doc/**
I tried to find online but don't seem to be there.
Thanks