| John Carter on Fri, 2 Jun 2000 09:04:02 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: GLUG: OT: C Programming question |
On Fri, 2 Jun 2000, Tom Cooper wrote:
> A quick one,
A quick answer. fflush.
Flush your buffers.
>
> I wrote the following C snippet :
>
> #include <stdio.h>
>
> main(){
>
> char name[9];
>
> printf("Username:");
> scanf("%s", &name);
> printf("\nHello, %s\n", &name);
> return(0);
> }
>
> My problem is, when I run it from a terminal, all works well,
> however, if I want to run it via inetd, i.e. telnet xxxx 20000 there
> is no output until I enter something, then everything is output to
> the terminal and the telnet connection is closed.
>
> Any C gurus to help me out?
>
John Carter
Work Email : john@xxxxxxxxxxxx Private email : cyent@xxxxxxxxxx
Yell Phone : 083-543-6915 Phone : 27-12-348-4246
"The code figure 05 shall be used when the obscuration to vision
consists predominantly of lithometeors." -
World Meteorological Organization Manual on Codes