answersLogoWhite

0

Preferably as little as possible, however it depends on the language. Low-level languages require a vast amount of user-comments because it can be extremely difficult to read the logic from the code alone. High-level languages require very few comments because the code should be largely self-documenting. Languages like C++ allow you to express concepts and ideas directly in code, so there's very little you need to document with a comment. Choosing good names for functions, classes and variables is a vital aspect of creating readable code.

User Avatar

Wiki User

10y ago

What else can I help you with?

Continue Learning about Engineering

What are its program components?

the main() function,the#include Directive, the variable definition. function prototype, program statements, the function definition,program comments and braces are the components of program in C++


How can you add a comment in a JavaScript?

Javascript uses C-style comments, for block comments (multiline) use: /* comments go anywhere in here */ for short one line comments use double-slash: // this is also a comment


What is comment in c programming?

COMMENT:- comment a re not necessary in the program. however, to understand the flow of programs the programmer can include comments in the program. comment are to be inserted by the programmer. It is useful for documentation.Comment are nothing but some kind of statements which are placed between the delimiters /* & */. The compiler does not execute comments. Thus, we can say that comments are not the part of executable program.The user can frequently use any number of comments that can be placed any where in the program. Please note that the comments and statements can be nested. The user should select the OPTION MENU of the editor and select the COMPILER - SOURCE -NESTED COMMENTS ON/OFF). The Comments can be inserted with a single statement or in nested statement.Types of comment in c/c++. is following bellow1. // this is a single line comment2. /* */ this sing is multi line OR nested line commentseg. /* int i=90;char ch=65; */ close multi line commentsmade by [ARUN KUMAR RAI]


Dry run table in flow-chart?

/* my second program in C++ with more comments */ #include <iostream> using namespace std; int main () { cout << "Hello World! "; // prints Hello World! cout << "I'm a C++ program"; // prints I'm a C++ program return 0; }


What are the symbols used to write comments?

In C++ we use // to begin a comment. A comment can begin anywhere on a line, even after a code statement, and will extend to the end of the line until a newline character is encounter. Multiple lines of comments must each begin with //. We can also use C-style comments, which begin with /* and end with */. These comments can extend across multiple lines, or can be used to comment out code within a statement.

Related Questions

How do you remove comment from c program?

There are no comments in C programs. Comments only exist in the source code and the precompiler automatically strips them out before the compiler sees them.


Can comments be longer than one line and if yes how?

C++ also supports C program's multiple command line /* your command */.


What are its program components?

the main() function,the#include Directive, the variable definition. function prototype, program statements, the function definition,program comments and braces are the components of program in C++


How can you add a comment in a JavaScript?

Javascript uses C-style comments, for block comments (multiline) use: /* comments go anywhere in here */ for short one line comments use double-slash: // this is also a comment


Do you need Microsoft c plus plus redistributable?

If you use microsoft's "Visual C++ Compiler" whoever is going to use your program needs the redistributable installed.


What are non executing statements that programmers place within their code to explain program statements in English?

Non-executing statements that programmers use to explain code are called comments. Comments are typically indicated by special characters, such as // for single-line comments or /* ... */ for multi-line comments in languages like C, C++, and Java. They provide clarity and context for others (or the original author) reading the code, helping to explain the purpose, functionality, or logic of specific segments without affecting the program's execution. These annotations are essential for maintaining code readability and collaboration among developers.


What is comment in c programming?

COMMENT:- comment a re not necessary in the program. however, to understand the flow of programs the programmer can include comments in the program. comment are to be inserted by the programmer. It is useful for documentation.Comment are nothing but some kind of statements which are placed between the delimiters /* & */. The compiler does not execute comments. Thus, we can say that comments are not the part of executable program.The user can frequently use any number of comments that can be placed any where in the program. Please note that the comments and statements can be nested. The user should select the OPTION MENU of the editor and select the COMPILER - SOURCE -NESTED COMMENTS ON/OFF). The Comments can be inserted with a single statement or in nested statement.Types of comment in c/c++. is following bellow1. // this is a single line comment2. /* */ this sing is multi line OR nested line commentseg. /* int i=90;char ch=65; */ close multi line commentsmade by [ARUN KUMAR RAI]


Dry run table in flow-chart?

/* my second program in C++ with more comments */ #include <iostream> using namespace std; int main () { cout << "Hello World! "; // prints Hello World! cout << "I'm a C++ program"; // prints I'm a C++ program return 0; }


What C program for display in triangle?

Please visit http://talentsealed.blogspot.com/2009/10/to-display-triangle-using-c-programming.html for the answer. Please let me know your comments


Why we need function in c?

To break up the program into smaller pieces to help us understand the use of a function.


What translator is needed for C programming language?

To translate the C source code program, you need a program called a "C compiler".


Why do programmers add comments to their code even though the computer itself ignores them?

The comments are there to (a) aid in debugging the program, (b) help the programmer layout the program in logical steps and (c) show anyone else looking at the code to see what each section of the code actually does.

Trending Questions
What Search engine are Web pages that list hyperlinks to Web pages containing text that matches your search expression.? Show that a JK flip-flop can be converted to a D-Flip-flop with an inverted between the J and K inputs.? Which winding is characterized by a large number of turns of thin wire? What is the code to calculate age from a date of birth entered in Microsoft small basic? How long chrome faucet last? What is meant by operating coil cut-off in trip relay? Show the wiring connection and star delta control panel? Three of the following improvements in agriculture that helped to bring on the Agricultural Revolution are correctly paired with their inventor or discoverer. Which is NOT? Why do we go for low pass filters? What are the dimerits of waterfall model? What is 60 KSI stand for? A 1000 KHz carrier is simultaneously modulated with 300 HZ and 2 KHZ audio sine waves Determine the frequencies that will be present in the output? What are the disadvantages of Practical work approach? What are your goals in education? What is the psi of a 2 inch by 60 inch pipe and a 1 inch by 60 inch pipe both vertical? How do you unlock buttons with Javascript? Memorymically and and not reclaming it when it is no longer it is needed in java there is no such problem as there is as garbage collector what is it? What does the omega sign means in electronics? How much does it cost to run a geothermal power plant? What are the various stages of the project planning process in construction and what factors affect the planning process?