Thursday, July 9, 2009

In C,how do i print double quotes(" ") in a printf statement?

try





printf(" \" ");





?

In C,how do i print double quotes(" ") in a printf statement?
You need to place an escape character prior to the quotation marks, so that the program understand that the quotation is part of the text, and not part of the program. For double quotations, place a forward slash before the quotation like this: \"
Reply:try printf("""").....
Reply:Just put a \ (backslash) behind the " so it would look like this:


printf("This is what a double quote looks like: \"");

garden flowers

No comments:

Post a Comment