The variable expansion suggestion is not quite what I'm looking for, but thanks for your quick reply anyway.
I am looking for a way for my program itself to know the exact path from where it was executed, even if the *.exe file is copied to a different location (such as when I give it to other users). Other compilers that I have used (years ago) returned the full path for argv[0], but the GCC C compiler for Code::Blocks only returns the executable file name, not the full path, for argv[0]. I have been searching for a way of changing this, but have not yet found a way.