Advertisement

06.03.2008 at 02:38PM PDT, ID: 23454855
[x]
Attachment Details

How do I output the " (double quote) character within a string in C?

Asked by geeta_m9 in C Programming Language

Tags: C

I wish to write the following line to a file in C.

<style type = "text/css" title = "screen" media="screen, print">

My question is how to I write the double quote character " ? If I do fprintf("<style type = "text/css" title...etc), it will regard the quote before the word "text" as the end of the string. How can I make it treat that double quote as a literal? The same goes for the double quotes around the word "screen" and "screen, print".



Start Free Trial
[+][-]06.03.2008 at 02:46PM PDT, ID: 21704872

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: C Programming Language
Tags: C
Sign Up Now!
Solution Provided By: Infinity08
Participating Experts: 1
Solution Grade: A
 
 
[+][-]06.03.2008 at 02:51PM PDT, ID: 21704926

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.03.2008 at 03:00PM PDT, ID: 21704980

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628