CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2004
    Posts
    41

    printing qoutes in c

    hi I just starting programming c I was hopping that some one could give me an example of some code to output (so that is displays the qoutes as well) then after this write a new line
    "This is a test"


    Thanks

  2. #2
    Join Date
    Nov 2002
    Location
    Foggy California
    Posts
    1,245
    You need to use escape sequences to print certain characters in C. For the case of the quotation mark, it is \". So your code would be:

    Code:
    printf("\"This is a test\"\n");

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured