\0 as input

Laura Frazier gnat at blake.acs.washington.edu
Tue Jan 23 04:33:14 AEST 1990



Greetings!

I am fairly new to C and my Unix is rusty at best.  So, this may seem a 
silly question to some...

I have written a program to read two strings with getchar() from an ascii
file.  The problem is that I can't use whitespace to delimit the strings, 
but can't figure out a way to say, "OK, here's a \0, now read the 2nd string."

Is there any way to write the null character into my input strings?

Or can I just input two ascii files, one for each string?  If so, how to
do that on Unix?

Thanks for your help!


+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|Laura B. Frazier		|	gnat at blake.acs.washington.edu	|
|Division of Cardiology,RG-22	| 					|
|University of Washington	|	Office(206) 543-3647		|
|Seattle, WA  98195   		|					|	
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



More information about the Comp.lang.c mailing list