I assume you are calling it without an argument, which would cause undefined behaviour. You need to supply an argument. To supply one that starts with a whitespace character you would need to use quotes: progname " arg"
If you are just trying to tell if the argument exists then use argc (the argument count). If it is greater than 1 then there is at least one argument. If you want exactly one argument then argc should equal 2.
Code:
#include <stdio.h>
int main(int argc, char **argv) {
if (argc != 2) {
printf("You must supply one argument.\n");
return 1;
}
printf("Argument: %s\n", argv[1]);
return 0;
}