io question

john.dalton tortica at cbnewsj.ATT.COM
Thu Mar 15 02:34:14 AEST 1990


...i hope i am posting to the correct group...excuse this if i'm not..


this i hope is a relatively esay question.

i wrote a c program, of which i am reading input and writing output
to a file.

the problem i am having is, i need to have the scanf reconize either
a return or newline form the keyboard.

simple enough, i also need the output to insert the space(as this is
what the scanf will take (hopefully), it as). in the output file.

		example:

	printf("\nEnter data.....for %s ",name);
	scanf("%s",epas); 

        I HIT RETURN HERE AND IT GOES ON TO THE NEXT QUESTION....

	printf("\nEnter data.....for %s ",name2);
	scanf("%s",epas2); 

   Your help is more then appreciated.....THANKS...

	email will be best....thanks in advanced.

		john D.



More information about the Comp.lang.c mailing list