print % in c

Dean Cookson dean at usenet.INS.CWRU.Edu
Tue Mar 5 02:40:22 AEST 1991


In article <875 at oliver.SUBLINK.ORG> newsuser at oliver.SUBLINK.ORG (Ugo Cei) writes:
>I think Richard is right on this one. What he was saying is that the
>*compiler* is likely to treat "\%" as "%". Obviously, when *printf*
>sees it, it does not know what to do and so it is likely to print
>nothing at all. This is true under SCO's rcc, MSC 5.1 and gcc 1.39
>(which indeed gives a warning : "unknown escape sequence `\%'").
>The following line of code will print the `%' under any of the three
>mentioned compilers. (I presume Sun cc will do the same.)
>
Ok, I'll give ya that one.  :-)

Dean
-- 
| Dean Cookson 	(Opinions?  What opinions??)	dean at 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	      |



More information about the Comp.lang.c mailing list