Craig Schlenter on Fri, 2 Jun 2000 09:44:45 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: GLUG: OT: C Programming question


>   printf("Username:");

stdout is buffered if you use printf. Try flushing it or use write.

>   scanf("%s", &name);
>   printf("\nHello, %s\n", &name);

s/&//

Oh, you do know of course that your program is prone to buffer overflow 
problems and is thus unsafe to expose to the world at large ...

--C