How will you print % character?

A) printf(“%%”)
B) printf(“\%”)
C) printf(“%”)
D) printf(“%%”)

Showing Answers 1 - 15 of 15 Answers

Amit

  • Dec 16th, 2005
 

printf(“%%”) will print %

prags

  • Jan 27th, 2006
 

All the 4 options are correct

you can use

printf("%");

or

printf("%%");

or

printf("\%");

to print %

But if you wnt to print %d then use

printf("%%d");

and not printf("\%d");

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions