An easy approach is to use sscanf() on argv[i] with %llu to parse unsigned long long integers. Here's some sample code:
#include <stdio.h>
int main(int argc, char *argv[]) {
unsigned long long example;
int i;
for (i = 1; i < argc; i++) {
sscanf(argv[i], "%llu", &example);
printf("Argument: %llu\n", example);
}
return 0;
}
You can use strtoull as well, in fact, I think scanf() uses it internally. Beware of overflows though, scanf() is not very well behaved with setting errno in appropriate occasions. I've had some problems with it. But you should be cool with unsigned long long, you really need a very big number to cause overflow.