Hi, I have some strange behavior of a C program. The code is simple:
#include <stdio.h> int main(void) { char input[255]; printf("Hello\n"); gets(input); return 0; } When I compile this into a file called "prog" and then run: "./prog|cat" I see that "Hello" is not printed until I give it input. Where is the buffer here and is there any way to bypass it? Alon -- This message was sent by Alon Altman ([EMAIL PROTECTED]) ICQ:1366540 GPG public key at http://8ln.org/pubkey.txt Key fingerprint = A670 6C81 19D3 3773 3627 DE14 B44A 50A3 FE06 7F24 -------------------------------------------------------------------------- -=[ Random Fortune ]=- He who steps on others to reach the top has good balance. ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]