C Program to Find Total of Even Integers

C Comments

C programming Comments are way of inserting remarks and reminders into a program without affecting its content. C Comments do not have a fixed place in program: the compiler treats them as though they were white space or blank characters and they are consequently ignored.

Programs can contain any number of comments without losing speed. This is because comments are stripped out of a source program by the compiler when it converts the source program into machine code.

Comments are marked out or delimited by the following pairs of characters:

Example,

/* ...... comment ......*/

Comments are used by the programmer as a documentation aid. The aim of documentation is to explain clearly how the program works and how it is to be used. Sometimes C comment contains an informal argument demonstrating the correctness of the program.

C Comments with Examples

C Comments should be written simultaneously with program text. Although some programmers insert comments as a last step, there are two problems with this approach. The main reason because comment is skipped over as though it were a single space, it can be placed anywhere where spaces are valid characters, even in the middle of a statement, though this is not to be encouraged.

The following illustrates one of many styles that can be used to highlight comments:

*****************************
* If you visit Technosap *
* put comments in a box. *
*****************************

We should try to minimize the use of comments in program while trying to maximize the readability of the program. If there are too many comments, you obscure your code and it is the code which is the main message in a program.

Example,


main () /* The almost trivial program */
{
/* This little line has no effect */
/* This little line has none */
/* This little line went all the way down
to the next line */
/* And so on ... */
}

Example :  Hello World Program with Comments

The second is that ideally the C comments should serve as running commentary, indicating program structure and contributing to program clarity and correctness. They cannot do this if they are inserted after the coding is finished.

Online Training Tutorials

  • C Program to Find Total of Even IntegersC Tutorial – Learn C Programming Language TutorialLearn C programming is very easy if you follow our popular C tutorial which will take you from the beginning of C programming. This C tutorial is mainly designed for beginners and […]
  • JavaScript Comments with ExamplesJavaScript Comments with ExamplesJavascript supports two types of comments (JavaScript Comments). Double-slashes (//) tell javascript to ignore everything to the end of the line. You will see them used most often to […]
  • JavaScript Node.jsJavaScript Node.jsJavaScript Node.js, a program that allows you to apply your JavaScript skills outside of the browser. With it, you can build anything from small command line tools to HTTP servers that […]
  • SAP Block Material for PostingSAP Accounting Entries from MMSAP MM Accounting Entries For Moving average price (MAP) E.g. : Purchase new material $22 quantity = 2 pcs During Goods Receipt Dr. Inventory Account $22 Cr. GR / IR Account […]
  • sap landscapeWhat is SAP Landscape?Just try to understand the system sap landscape, Every company follows their own landscape as a standard you will have three servers like development, quality assurance and production […]
  • Central Address ManagementCentral Address Management (CAM) in SAPIn one of our development, we had to update Purchasing Group of vendor using BDC calling transaction MK02. We came across a strange issue, i.e., the change document header (CDHDR) and […]
  • Authorization ObjectsHow to create Customized Authorization Objects (SU21)SAP Authorization Objects   The SAP Authorization Objects, as the name itself suggests, is a method of restricting users to access any particular application created in the system. It […]
  • Transactions in SAPWhat is Transactions in SAP?The Transactions in SAP terminology is Execution of a program. The normal way of executing ABAP code in the SAP system is by entering a transaction code (for instance, SE51 is the code for […]