Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

  1. Home >
  2. All Categories >
  3. Computers & Internet >
  4. Programming & Design >
  5. Resolved Question
??? ???
Member since:
October 05, 2008
Total points:
99 (Level 1)

Resolved Question

Show me another »

How to print % symbol in C language. ?

I am typing this: printf("part(%) ") but this does not work
Neeraj Yadav♥ by Neeraj Yadav♥
Member since:
September 06, 2006
Total points:
19,951 (Level 6)

Best Answer - Chosen by Voters

Yep both are right..
50% 2 Votes
To print an individual character, use %c. This causes the matching argument to be output, unmodified, to the screen.
To print a string, use %s.
fore more details visit:
http://www.free4ebook.com/Printing%20Characters%20in%20c.html

Report Abuse

Other Answers (2)

  • llaffer by llaffer
    A Top Contributor is someone who is knowledgeable in a particular category.
    Member since:
    January 27, 2008
    Total points:
    74,379 (Level 7)
    Badge Image:
    A Top Contributor is someone who is knowledgeable in a particular category.
    printf("part(\%)");
    25% 1 Vote
    • 1 person rated this as good
  • Zeta1 by Zeta1
    Member since:
    March 07, 2008
    Total points:
    20,372 (Level 6)
    printf("this is a %% (twice)\n");

    a % quote the next %.
    25% 1 Vote
    • 1 person rated this as good

Answers International

Yahoo! does not evaluate or guarantee the accuracy of any Yahoo! Answers content. Click here for the Full Disclaimer.

Help us improve Yahoo! Answers. Send Feedback