By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,331 Members | 1,428 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,331 IT Pros & Developers. It's quick & easy.

how c language to realize multiple ?

P: n/a
liu
how c language to realize multiple ? can anyone tell me , thank you!
Nov 13 '05 #1
Share this Question
Share on Google+
12 Replies


P: n/a
liu <li******@126.com> scribbled the following:
how c language to realize multiple ? can anyone tell me , thank you!


Multiple *what*?

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"My absolute aspect is probably..."
- Mato Valtonen
Nov 13 '05 #2

P: n/a
"liu" <li******@126.com> wrote in news:bp***********@mail.cn99.com:
how c language to realize multiple ? can anyone tell me , thank you!


That's easy, just define it, e.g.

int main(void)
{
int multiple; /* <-- multiple now realized */

return 0;
}

Glad to help.

--
- Mark ->
--
Nov 13 '05 #3

P: n/a
liu wrote:
how c language to realize multiple ? can anyone tell me , thank you!


Liu...

English language problem:

multiple == more than one

Did you mean multiply (mathematical operation) ?

--
Morris Dovey
West Des Moines, Iowa USA
C links at http://www.iedu.com/c
Read my lips: The apple doesn't fall far from the tree.

Nov 13 '05 #4

P: n/a
On Fri, 21 Nov 2003, liu wrote:
how c language to realize multiple ? can anyone tell me , thank you!


Bizarrely. Avoid them.
(or look up trigraphs if you really need the gory details)

Nov 13 '05 #5

P: n/a
liu wrote:

how c language to realize multiple ? can anyone tell me , thank you!


char queries[] = "????????????????";

--
Chuck F (cb********@yahoo.com) (cb********@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!
Nov 13 '05 #6

P: n/a
On 2003-11-21, Jarno A Wuolijoki <jw******@cs.Helsinki.FI> wrote:
On Fri, 21 Nov 2003, liu wrote:
how c language to realize multiple ? can anyone tell me , thank you!


Bizarrely. Avoid them.
(or look up trigraphs if you really need the gory details)


Aha! You have an excellent natural language parser in your noggin.

Does the OP mean in a string literal or character constant? The answer
is to use the \? escape sequence.

-- James
Nov 13 '05 #7

P: n/a

On Fri, 21 Nov 2003, CBFalconer wrote:

liu wrote:

how c language to realize multiple ? can anyone tell me , thank you!


char queries[] = "????????????????";


Quick -- what is the output of

puts(queries);

No peeking! :)

-Arthur,
?????
Nov 13 '05 #8

P: n/a
"Arthur J. O'Dwyer" <aj*@nospam.andrew.cmu.edu> wrote in message
news:Pi***********************************@unix45. andrew.cmu.edu...

On Fri, 21 Nov 2003, CBFalconer wrote:

liu wrote:

how c language to realize multiple ? can anyone tell me , thank you!
char queries[] = "????????????????";


Quick -- what is the output of

puts(queries);


????????????????
No peeking! :)


A more interesting scenario is...

char queries[] = "'????????????????'";

Mac programmers of old should know, or at least know there's a potential
problem.

--
Peter
Nov 13 '05 #9

P: n/a
"Arthur J. O'Dwyer" wrote:
On Fri, 21 Nov 2003, CBFalconer wrote:
liu wrote:

how c language to realize multiple ? can anyone tell me


char queries[] = "????????????????";


Quick -- what is the output of

puts(queries);

No peeking! :)


It is "????????????????" without the quotes and with a final
'\n'. Assuming a system that conforms to the C standard.

--
Chuck F (cb********@yahoo.com) (cb********@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!
Nov 13 '05 #10

P: n/a

On Sat, 22 Nov 2003, Peter Nilsson wrote:

"Arthur J. O'Dwyer" <aj*@nospam.andrew.cmu.edu> wrote...
On Fri, 21 Nov 2003, CBFalconer wrote:

char queries[] = "????????????????";
Quick -- what is the output of

puts(queries);


????????????????


Whoops -- my memory was faulty! I could've sworn there
was an "escape" trigraph ??? => ?, so that the above would
print fewer ?s than expected. But there's not. Peter and
Chuck are correct.

A more interesting scenario is...

char queries[] = "'????????????????'";

Mac programmers of old should know, or at least know there's a potential
problem.


<ot>
Did some Mac language contain the ??' => ^ trigraph?
</ot>

-Arthur
Nov 13 '05 #11

P: n/a
On Sat, 22 Nov 2003 05:14:52 -0500, Arthur J. O'Dwyer wrote:

On Sat, 22 Nov 2003, Peter Nilsson wrote:

"Arthur J. O'Dwyer" <aj*@nospam.andrew.cmu.edu> wrote...
> On Fri, 21 Nov 2003, CBFalconer wrote:
> >
> > char queries[] = "????????????????";
>
> Quick -- what is the output of
>
> puts(queries);


????????????????


Whoops -- my memory was faulty! I could've sworn there
was an "escape" trigraph ??? => ?, so that the above would
print fewer ?s than expected. But there's not. Peter and
Chuck are correct.

A more interesting scenario is...

char queries[] = "'????????????????'";

Mac programmers of old should know, or at least know there's a potential
problem.


<ot>
Did some Mac language contain the ??' => ^ trigraph?
</ot>


Old Mac C compilers let you pack 4 8-bit characters in an int by including
them all in a character literal:

int creator = 'PROG';
int type = 'myTp';

This was necessary because such multi-character constants were used by the
operating system to as program and file-type identifiers. I don't know if
that's exactly what Arthur is talking about though, because I don't
remember there being an issue with including such character constants in
string literals. I guess it's been too long.
Nov 13 '05 #12

P: n/a
"Arthur J. O'Dwyer" <aj*@nospam.andrew.cmu.edu> wrote in message
news:Pi***********************************@unix50. andrew.cmu.edu...
On Sat, 22 Nov 2003, Peter Nilsson wrote:
A more interesting scenario is...

char queries[] = "'????????????????'";

Mac programmers of old should know, or at least know there's a potential
problem.


<ot>
Did some Mac language contain the ??' => ^ trigraph?
</ot>


It was avoided by writing '???\?' instead of '????' (a common constant).

--
Peter
Nov 13 '05 #13

This discussion thread is closed

Replies have been disabled for this discussion.