Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!spool.mu.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!ncar!gatech!usenet.ins.cwru.edu!usenet!dean From: dean@usenet.INS.CWRU.Edu (Dean Cookson) Newsgroups: comp.lang.c Subject: Re: print % in c Message-ID: <1991Feb25.232900.18406@usenet.ins.cwru.edu> Date: 25 Feb 91 23:29:00 GMT References: <61516@eerie.acsu.Buffalo.EDU> <31530035@hpcvia.CV.HP.COM> Sender: news@usenet.ins.cwru.edu Reply-To: dean@po.CWRU.Edu Organization: Case Western Reserve Univ. Cleveland, Ohio, (USA) Lines: 27 Nntp-Posting-Host: usenet.ins.cwru.edu In article <31530035@hpcvia.CV.HP.COM> brianh@hpcvia.CV.HP.COM (brian_helterline) writes: >Any character following a \ will be taken literally so just preceed >any "special" char with a \ so: > > printf( "This is a slash \\ and a precent sign \%\n" ) > >would produce: This is a slash \ and a percent sign % Ahhh no. What you want to do is: printf("%%\n"); Which will print: % Is in K&R. Dean -- | Dean Cookson (Opinions? What opinions??) dean@po.cwru.edu | | Information Network Services DoD #207 AMA #573534 | | Case Western Reserve U. Cleveland, Oh 44106 1981 Honda CB750C | | 216-754-1834 (H) 216-368-2928 (W) 1988 Bianchi Limited |