Risky question?

M

mdeh

Hi Group,
At the risk of being very repetitive, may I ask this. K&R 1-23 has been
extensively covered in the archives. I have read all these and the
answer offered by Tondo/Gimpel.
In seeking to eliminate comments from a valid C program, special
attention is directed at the double-forward slash (//). My question is
when would this arise? If it appears within double-quotes or
single-quotes it should be handled there, and if it appears thus:

/* stuff here */ /* more stuff here */

then it should be handled as 2 different comments?

I may have missed it in some of the previous discussions, and if so , I
will happily be directed there.

Thank you.
 
D

davidrubin

Hi Group,
At the risk of being very repetitive, may I ask this. K&R 1-23 has been
extensively covered in the archives. I have read all these and the
answer offered by Tondo/Gimpel.
In seeking to eliminate comments from a valid C program, special
attention is directed at the double-forward slash (//). My question is
when would this arise? If it appears within double-quotes or
single-quotes it should be handled there, and if it appears thus:

/* stuff here */ /* more stuff here */

then it should be handled as 2 different comments?

I may have missed it in some of the previous discussions, and if so , I
will happily be directed there.

Thank you.

int i = 7 / /* comment */ 2;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,183
Messages
2,570,965
Members
47,511
Latest member
svareza

Latest Threads

Top