No, you aren't doing anything wrong. Quoting the C standard, chapter 5.1.2.2.1 "Program startup":
— If the value of argc is greater than zero, the array members argv[0] through
argv[argc-1] inclusive shall contain pointers to strings, which are given
implementation-defined values by the host environment prior to program startup. The
intent is to supply to the program information determined prior to program startup
from elsewhere in the hosted environment. If the host environment is not capable of
supplying strings with letters in both uppercase and lowercase, the implementation
shall ensure that the strings are received in lowercase.
— If the value of argc is greater than zero, the string pointed to by argv[0]
represents the program name; argv[0][0] shall be the null character if the
program name is not available from the host environment. If the value of argc is
greater than one, the strings pointed to by argv[1] through argv[argc-1]
represent the program parameters.
Read, the things written into argv are
implementation-defined. All bets are off as to whether argv[0] contains an absolute or relative path, or any path at all. Besides, the current directory need not be the same as the program's directory. Paths are platform-dependent, so there is no way to determine them platform-
independantly.