Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 152
  • Last Modified:

array

if i want to type a paragraph which must end with symbol %,how can i do it?
can anyone give me a simple example?
0
ahmei
Asked:
ahmei
  • 2
1 Solution
 
nietodCommented:
char *Sentence[] = "This is a sentence that ends in %.";

Is that what you want?
0
 
nietodCommented:
Or do you mean you want to output a line with printf() that contains a "%"?  If so use two %'s in the format string like,

printf("This is a string with one Percent sign: %%");

Only one percent sign will be ouput for each pair of percent signs encountered.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now