Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > how to print

Reply
Thread Tools

how to print

 
 
babu
Guest
Posts: n/a
 
      08-24-2007
how to print " using printf statement in C language

 
Reply With Quote
 
 
 
 
Ian Collins
Guest
Posts: n/a
 
      08-24-2007
babu wrote:
> how to print " using printf statement in C language
>

"\""

--
Ian Collins.
 
Reply With Quote
 
 
 
 
CBFalconer
Guest
Posts: n/a
 
      08-24-2007
babu wrote:
>
> how to print " using printf statement in C language


You can escape it (i.e. "\"") or you can use putc(), fputc(), or
putchar(). Depends on convenience.

--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>



--
Posted via a free Usenet account from http://www.teranews.com

 
Reply With Quote
 
Martin Ambuhl
Guest
Posts: n/a
 
      08-24-2007
babu wrote:
> how to print " using printf statement in C language
>


#include <stdio.h>
printf("\"");


 
Reply With Quote
 
Lars.Dahlback@gmail.com
Guest
Posts: n/a
 
      08-24-2007
printf("\"");
printf("\42"); /* octal! */
printf("%c", '"');
printf("%c", 34);

 
Reply With Quote
 
Mark Bluemel
Guest
Posts: n/a
 
      08-24-2007
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:

[About printing the double quote character]

> printf("\"");
> printf("\42"); /* octal! */


For a specific character set.

> printf("%c", '"');
> printf("%c", 34);


see above
>

 
Reply With Quote
 
CBFalconer
Guest
Posts: n/a
 
      08-24-2007
(E-Mail Removed) wrote:
>
> printf("\"");
> * printf("\42"); /* octal! */
> printf("%c", '"');
> * printf("%c", 34);


The ones marked with '*' won't work in EBCDIC, or other non-ANSI
char sets.

--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>



--
Posted via a free Usenet account from http://www.teranews.com

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
print a vs print '%s' % a vs print '%f' a David Cournapeau Python 0 12-30-2008 03:19 AM
Problem - I want to print Current Output of Pdf file and should print once.I get print dialog box but it is not working keto Java 0 05-30-2007 11:27 AM
Can't print to print server =?Utf-8?B?cGVjaw==?= Wireless Networking 2 02-03-2005 02:41 PM
Unlarging the print to print using PDF file to print Bun Mui Computer Support 3 09-13-2004 03:15 AM



Advertisments