top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

C: How to get display '%' and '\' symbol?

0 votes
53 views
C: How to get display '%' and '\' symbol?
posted Aug 19, 2014 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

There are two ways to display these symbols.

  1. printf("%c %c", '%', '/');

  2. printf("//"); // it will print the "/" symbol as a output.
    printf("%%"); // it will print the "%" symbol as a output.

and if you want print both the symbols in a single printf(), then

  1. printf("/%%"); // output is /%
    or
  2. printf("%%/"); // output is %/
answer Aug 19, 2014 by Arshad Khan
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...