ttyname() - question
Shiping Zhang
ping at cubmol.BIO.COLUMBIA.EDU
Wed Aug 30 09:50:10 AEST 1989
In article <99 at lkbpyr.UUCP> jonas at lkbpyr.UUCP (Jonas Heyman) writes:
>Hello,
>
>I was wondering why this work:
>#include <stdio.h>
>main()
>{
> char *term;
> char *ttyname();
> term=ttyname();
> printf("%d",term);
>}
I am wondring too because the format of printf() should be %s.
>And why this don't:
>#include <stdio.h>
>main()
>{
> test();
>}
>
>test()
>{
> char *term;
> char *ttyname();
> term=ttyname();
> printf("%d",term);
>}
I guess because the format of printf() is incorrect.
-ping
More information about the Comp.lang.c
mailing list