[6324] in Athena Bugs
Re: vax 7.1H: man printf
daemon@ATHENA.MIT.EDU (Barr3y Jaspan)
Fri Nov 2 17:51:34 1990
Date: Fri, 2 Nov 90 17:51:18 -0500
From: "Barr3y Jaspan" <bjaspan@ATHENA.MIT.EDU>
To: Beth Kevles (Full Time Consultant) <kevles@ATHENA.MIT.EDU>
Cc: bugs@ATHENA.MIT.EDU
In-Reply-To: [6321]
Doublequote is not listed among the special characters for printf()
because it isn't one. It is a special character to C; if you want a "
in a string constant, you have to backslash it. The following code
will print a " without the use of a blackslash:
{
char buf[2];
buf[0] = 34; /* " is ascii 34 */
buf[1] = 0;
printf(buf);
}