Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!spool.mu.edu!sdd.hp.com!hp-pcd!hpcvia!brianh From: brianh@hpcvia.CV.HP.COM (brian_helterline) Newsgroups: comp.lang.c Subject: Re: print % in c Message-ID: <31530035@hpcvia.CV.HP.COM> Date: 25 Feb 91 17:05:02 GMT References: <61516@eerie.acsu.Buffalo.EDU> Organization: Hewlett-Packard Co., Corvallis, Oregon Lines: 10 haozhou@acsu.buffalo.edu (Hao Zhou) writes: >since % and \ are recognized as special characters in printf, how do >you print out such kind special chars using printf? 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 %