Rules of Writing Comments in C Programming

July 8, 2010 1 Comment » Hits : 230





Rules :
1 . Program Contain Any number of comments at any place

void main(/*Main Function*/)
{
int age; // Variable
printf("Enter Your Age : ");
scanf("%d",/*Type Age*/&age);
printf("Age is %d : ",/*Your age here*/age);
getch()
}

2 . Nested Comments are not allowed i.e Comment within Comment

/* This is /*Print Hello */ */
printf("Hello");

3 . Comments can be split over more than one line.

printf("Hello");    /* This
                       is
                       Comment */

4 . Comments are not Case-Sensitive.

printf("Hello");
    /* This is Comment */
    /* THIS IS COMMENT */

5 . Single line Comments Starts with ‘//’

printf("Hello");
    // This is Single Line Comment

Incoming search terms:

  • http://reddeadmovie.net/2011/a-consumers-guidebook-to-led-flashlights/ Ronna Domagala

    Aw, this was a really nice post. In idea I want to put in writing like this moreover ñ taking time and precise effort to make an excellent articleÖ however what can I sayÖ I procrastinate alot and certainly not seem to get one thing done.