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.
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++
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
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]
/* 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; }
Nothing.
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.
C++ also supports C program's multiple command line /* your command */.
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++
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
If you use microsoft's "Visual C++ Compiler" whoever is going to use your program needs the redistributable installed.
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]
/* 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; }
Please visit http://talentsealed.blogspot.com/2009/10/to-display-triangle-using-c-programming.html for the answer. Please let me know your comments
To break up the program into smaller pieces to help us understand the use of a function.
To translate the C source code program, you need a program called a "C compiler".
Use a text-editor program.
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.