+ 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 Réponses
+ 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
Solo Wanderer 4315
Solo Wanderer 4315 - 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