How to write another */ inside a comment. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to write another */ inside a comment.

Try writhing this:- /* The question is answer " */ " got it? */ For those who did not understand or this task seems easy. Here the comment ends at the */ resulting in compilation error just from the next word (").

4th Jan 2018, 4:57 PM
Avi Tiwari
Avi Tiwari - avatar
5 Answers
+ 4
There is no way you can. The parser always reads */ first and stops at the first one encountered. There is no way to skip the */ using a backslash, etc.
4th Jan 2018, 5:55 PM
Kinshuk Vasisht
Kinshuk Vasisht - avatar
+ 1
No dude u didn't get it. I asked how to write */ in a comment.
4th Jan 2018, 5:15 PM
Avi Tiwari
Avi Tiwari - avatar
0
may be by writing this // */
4th Jan 2018, 6:46 PM
Rishabh Rawat
Rishabh Rawat - avatar
0
@Rishab Ravat No you cannot use multiple comment statements within each other infact it will print // inside the comment.
4th Jan 2018, 6:50 PM
Avi Tiwari
Avi Tiwari - avatar
- 1
/* comments here */ or //coments here //.......... //..............
4th Jan 2018, 5:12 PM
BogdanN997 @ Pablo
BogdanN997 @ Pablo - avatar