Purchase Solution

Comments in Programming Languages

Not what you're looking for?

Ask Custom Question

Many contemporary languages allow two kinds of comments, one in which delimiters are used on both ends(for multiple-line comments), and one in which delimiter marks only the beginning of the comment ( for one-line comments), Discuss the advantages and disadvantages of each.

Purchase this Solution

Solution Summary

There are two kinds of comments allowed in programming languages - one in which delimiters are used on both ends(for multiple-line comments), and one in which delimiter marks only the beginning of the comment ( for one-line comments). The advantages and disadvantages of each of them are discussed.

Solution Preview

Comments are intended for human readers and are ignored by the compiler. They do NOT make the executable code longer, nor do they cause the program to slow down.

Programs typically contain a mixture of both comment forms. Comment pairs generally are used for multi-line explanations, whereas double slash comments tend to be used for half-line and single-line remarks.

*Both-End Comment Disadvantage: Comment Pairs Do Not Nest
A comment that begins with /* always ends ...

Purchase this Solution


Free BrainMass Quizzes
Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.

C# variables and classes

This quiz contains questions about C# classes and variables.

Javscript Basics

Quiz on basics of javascript programming language.

Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.