assigning within TEST of for-loop
This commit is contained in:
parent
8f7bd1099c
commit
e580f39207
5
ex10.c
5
ex10.c
@ -3,9 +3,10 @@
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
char *arg;
|
||||||
|
|
||||||
for(i = 0; i < argc; i++) {
|
for(i = 0; i < argc && (arg = argv[i]); i++) {
|
||||||
printf("arg %d: %s\n", i, argv[i]);
|
printf("arg %d: %s\n", i, arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *states[] = {
|
char *states[] = {
|
||||||
|
Loading…
Reference in New Issue
Block a user