strcspn does what you want. The 'c' stands for compliment, and it counts how many leading characters of your string are not any of the given characters. It returns the length of the string if none of the given characters are in the string.
Code:
size_t n = strcspn(argv[1], "#");
if (n < strlen(argv[1]))
printf("First # is at position %zu\n", n); // %zu is correct for size_t
else
printf("# is not in the string\n");
You could also use strchr and subtract the original string start from the result (if not NULL).