Solved

array

Posted on 1998-05-08
2
143 Views
Last Modified: 2010-04-10
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
Comment
Question by:ahmei
  • 2
2 Comments
 
LVL 22

Accepted Solution

by:
nietod earned 0 total points
ID: 1175062
char *Sentence[] = "This is a sentence that ends in %.";

Is that what you want?
0
 
LVL 22

Expert Comment

by:nietod
ID: 1175063
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now