how to print

Discussion in 'C Programming' started by babu, Aug 24, 2007.

  1. babu

    babu Guest

    how to print " using printf statement in C language
     
    babu, Aug 24, 2007
    #1
    1. Advertising

  2. babu

    Ian Collins Guest

    babu wrote:
    > how to print " using printf statement in C language
    >

    "\""

    --
    Ian Collins.
     
    Ian Collins, Aug 24, 2007
    #2
    1. Advertising

  3. babu

    CBFalconer Guest

    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
     
    CBFalconer, Aug 24, 2007
    #3
  4. babu wrote:
    > how to print " using printf statement in C language
    >


    #include <stdio.h>
    printf("\"");
     
    Martin Ambuhl, Aug 24, 2007
    #4
  5. babu

    Guest

    printf("\"");
    printf("\42"); /* octal! */
    printf("%c", '"');
    printf("%c", 34);
     
    , Aug 24, 2007
    #5
  6. babu

    Mark Bluemel Guest

    wrote:

    [About printing the double quote character]

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


    For a specific character set.

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


    see above
    >
     
    Mark Bluemel, Aug 24, 2007
    #6
  7. babu

    CBFalconer Guest

    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
     
    CBFalconer, Aug 24, 2007
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bad_Kid
    Replies:
    3
    Views:
    3,953
    Shawn H. Mesiatowsky
    Apr 7, 2005
  2. Bryan Shaw

    Lock Print Screen and File Print

    Bryan Shaw, Apr 19, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    3,954
    Kevin Spencer
    Apr 20, 2005
  3. EDom
    Replies:
    0
    Views:
    442
  4. keto
    Replies:
    0
    Views:
    964
  5. David Cournapeau

    print a vs print '%s' % a vs print '%f' a

    David Cournapeau, Dec 30, 2008, in forum: Python
    Replies:
    0
    Views:
    364
    David Cournapeau
    Dec 30, 2008
Loading...

Share This Page