"Maybe not programming related, but I want to reference this directory in c program.
If you try to opendir the string literal ""~/"" in C, you'll find it doesn't exist. It is a Bash/Csh shorthand notation that is expanded by the shell to the home directory. It does not exist as such on the filesystem and so a C program will fail- unless it invokes Bash, for example, and allows Bash to expand the string."