Originally posted by chao-long liao:
1. class Red {
2. // Comment1
3. // // Comment2
4. /* Comment3 */
5. /* Comment4
6. */
7. /** Comment5 */
8. // /* Comment6 */
9. /* // Comment7 */
10. /* /* Comment8 */
11. /** /* // Comment9 // /* */
12. /* Comment10 */*/
13. /* Comment11 /* Comment12 */ */
14. }
What is the result of attempting to compile the program?
Ans: compile error at line12,13
why??
Comment 10 has two comment tail character sequences--*/*/. The first one is recognized as the end of the comment, and the second one results in a compiler error. A similar problem exists at the end of comment 12.
[ August 07, 2002: Message edited by: Dan Chisholm ]