Xref: utzoo comp.lang.c:25261 comp.unix.questions:19269 Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uwm.edu!uakari.primate.wisc.edu!caesar.cs.montana.edu!ogicse!blake!gnat From: gnat@blake.acs.washington.edu (Laura Frazier) Newsgroups: comp.lang.c,comp.unix.questions Subject: \0 as input Keywords: \0, input, getchar()\ Message-ID: <5412@blake.acs.washington.edu> Date: 22 Jan 90 17:33:14 GMT Organization: Univ of Washington, Seattle Lines: 25 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@blake.acs.washington.edu | |Division of Cardiology,RG-22 | | |University of Washington | Office(206) 543-3647 | |Seattle, WA 98195 | | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++