Thanks for all the replies!!
> > Hi,
> >
> > Please check the code segment.
> > /*code start /
> > #include
> > int func1(char **a_argv){
> > while (*a_argv!=NULL)
> > printf("\n%s", *a_argv++);
> > return(0);
> > }
> >
> > int main(int argc, char *argv[]){
> > func1(&argv[0])
On Tuesday 21 May 2002 04:31 am, Deepak Kotian wrote:
> Hi,
>
> Please check the code segment.
> /*code start /
> #include
> int func1(char **a_argv){
> while (*a_argv!=NULL)
> printf("\n%s", *a_argv++);
> return(0);
> }
>
> int main(int argc, char *argv[]){
> func1(&argv[0]);
On Tuesday 21 May 2002 04:31 am, Deepak Kotian wrote:
> Hi,
>
> Please check the code segment.
> /*code start /
> #include
> int func1(char **a_argv){
> while (*a_argv!=NULL)
> printf("\n%s", *a_argv++);
> return(0);
> }
>
> int main(int argc, char *argv[]){
> func1(&argv[0]);
Craig Dickson <[EMAIL PROTECTED]> writes:
> He didn't write "**argv != NULL", he wrote "*argv != NULL" -- in other
> words, not "last argument is a null string", but "the last pointer in
> the argv array is a NULL". Which is a common behavior (both gcc 2.95 and
> Microsoft Visual C++ do it, at lea
Elizabeth Barham wrote:
> The only thing that is troubling is the (**argv != NULL) which assumes
> that the last string is a NULL string (the first character is NULL),
> as opposed to using the count (argc), which may not be the case (it's
> not here).
He didn't write "**argv != NULL", he wrote "
Craig Dickson <[EMAIL PROTECTED]> writes:
> I think the convention that argv[argc] == NULL is common enough that
> this should be acceptable in practice, but I'm not sure it's actually in
> the C89 standard,
FWIW, it is. Section 5.1.2.2.1.
--
Alan Shutko <[EMAIL PROTECTED]> - In a variety of f
Hi Deepak,
"Deepak Kotian" <[EMAIL PROTECTED]> writes:
> Hi,
>
> Please check the code segment.
> /*code start /
> #include
> int func1(char **a_argv){
> while (*a_argv!=3DNULL)
> printf("\n%s", *a_argv++);
> return(0);
> }
>
> int main(int argc, char *argv[]){
> func1(&arg
Deepak Kotian wrote:
> Please check the code segment.
> /*code start /
> #include
> int func1(char **a_argv){
> while (*a_argv!=NULL)
> printf("\n%s", *a_argv++);
> return(0);
> }
>
> int main(int argc, char *argv[]){
> func1(&argv[0]);
> }
> /*code end /
>
>
Hi,
Please check the code segment.
/*code start /
#include int func1(char
**a_argv){ while (*a_argv!=NULL) printf("\n%s",
*a_argv++); return(0);}
int main(int argc, char
*argv[]){ func1(&argv[0]);}
/*code end /
This func1 function prints all the arguments
9 matches
Mail list logo