You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
437 B
27 lines
437 B
#include <stdio.h>
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
int i = argc;
|
|
int arg;
|
|
while(i > 0) {
|
|
arg = argc - i;
|
|
printf("arg %d: %s\n", arg, argv[arg]);
|
|
i--;
|
|
}
|
|
|
|
char *states[] = {
|
|
"California", "Oregon",
|
|
"Washington", "Texas"
|
|
};
|
|
|
|
int num_states = 4;
|
|
i = 0;
|
|
while(i < num_states) {
|
|
printf("state %d: %s\n", i, states[i]);
|
|
i++;
|
|
}
|
|
|
|
return 0;
|
|
}
|