I like pointer notation in C more than I like array notation, but just can't figure it out for some cases. I have the following code, and the body of main
/*converts arguemnt to number using atoi()*/
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv) {
int i, times;
if(argc < 2 || (times=atoi(argv[1])) < 1) {
printf("Usage :%s positive-number\n", argv[0]);
} else {
for(i = 0; i < times; i++) {
puts("Hello");
}
}
return 0;
}
How would I express argv[1] and argv[0] in pointer notation?