S
subramanian
In the SECOND EDITION of the book "The C Programming Language - ANSI
C" by K & R,
the following is mentioned:
In page 114, in Section 5.10 "Command-line Arguments", it is mentioned
that argv is a pointer to an array of character strings. Again on the
next page 115, it is mentioned that argv is a pointer to an array of
pointers.
However in the example that follows this statement in this book, the
program is given as mentioned below:
#include <stdio.h>
main(int argc, char *argv[ ] )
{
while (--argc > 0)
printf("%s%s", *++argv, (argc > 1) ? " " : "");
printf("\n");
return 0;
}
MY DOUBT:
C" by K & R,
the following is mentioned:
In page 114, in Section 5.10 "Command-line Arguments", it is mentioned
that argv is a pointer to an array of character strings. Again on the
next page 115, it is mentioned that argv is a pointer to an array of
pointers.
However in the example that follows this statement in this book, the
program is given as mentioned below:
#include <stdio.h>
main(int argc, char *argv[ ] )
{
while (--argc > 0)
printf("%s%s", *++argv, (argc > 1) ? " " : "");
printf("\n");
return 0;
}
MY DOUBT: