Comments in C - Featured

Hello Everyone, Welcome back to Think & Free. Here another episode of Express Learning Programming with the GNU C Programming Language Programming Series. Today I’m going to show you What and, How to Use Comments in C.

What is Comments ?

In Every programming language, Comments used to take notes about codes. It helps more to make the program easier for developers. Another thing is
comments are used for sometimes, temporarily deactivate some code lines.

In Compiler Programming Languages, Compiler will ignore Comments at the compilation process. That means the compiler didn’t include comments for compiled files. The Comments only allowed the Developer can, see, create & edit. In Interpreted Programming languages, The interpreter will be ignored interpret Commented code lines.

Let’s see how can we use it.

Comments in C

Comments and their Syntax will difference between language to language. Basically in C Programming Language, we can see two types of comments. Let’s look at what are they.

  • Multi-line or Block Comments
  • Single-line Comments

These are the two types of Comments we can use in the GNU C Programming Language. The multi-line comments will allows you to create a block of comment or something like a paragraph or something like that. All these comments can be used in anywhere in your program, comments are not location specified.

C Multi-line Comment

In this type of comments will allows to set multi-line comments in C, it’s like you can use some comments like paragraphs. let’s see how to use this type comments in C.

Multi-line comments will start with /* and it ends with “*/“, in every content in these “/* */” block will ignore compiler in the compilation process. it’s only allowed to the developer to take note that codes.

C Single-line Comment

Here is another type of Comment syntax we can use in the C Programming language. let’s see how to use it. If in any line we can start this type of comments using “//“.

Let’s look at the example down below. You can get a some idea on it.

/*
    C comments Example by Think & Free
    This is a Multiline comment in C
    Here is the third line.
*/
#include 
int main()
{
    // Print 'Hello, World' String on Console window
    printf("Hello, World\n");
    return 0;
}

Look at the code, now you can compile and run this code, see the result (If you don’t have an idea of how to compile and run C code. check out our previous lesson). It will only provide, output for “printf("Hello, World\n");“. I think that’s enough for, Get some idea about “Comments” in C. See you back soon with another episode of this Express Learning Programming win GNU GCC Programming Language. “Practice yourself” it’s the only way to learn something new.

16 thoughts on “Express Learning Programming – Comments in C

  1. I will immediately seize your rss as I can not find your email
    subscription link or newsletter service. Do you have
    any? Please permit me understand in order that I may just subscribe.

    Thanks. I’ll right away seize your rss as I can not find your e-mail subscription hyperlink or newsletter service.
    Do you have any? Kindly allow me recognise so
    that I could subscribe. Thanks. Thank you
    for the good writeup. It in fact was a amusement account it.

    Look advanced to far added agreeable from you! By the way, how could we communicate?
    http://foxnews.org

    Feel free to visit my web blog :: Jim

  2. Oh my goodness! Awesome article dude! Many thanks, However I am having troubles with your RSS.

    I don’t understand the reason why I can’t subscribe
    to it. Is there anyone else getting the same RSS issues?

    Anyone that knows the solution will you kindly respond?

    Thanks!!

  3. Hey I know this is off topic but I was wondering if you knew
    of any widgets I could add to my blog that automatically tweet my newest twitter
    updates. I’ve been looking for a plug-in like
    this for quite some time and was hoping maybe you would have some experience with something like this.
    Please let me know if you run into anything.
    I truly enjoy reading your blog and I look forward to your new updates.

  4. I do not leave many remarks, however i did some searching and wound up here Comments in C (Express Learning Programming) –
    THINK&FREE. And I actually do have a couple of questions for you if you tend
    not to mind. Could it be only me or does it look like a few of the comments appear like
    they are written by brain dead visitors? 😛 And, if you are
    posting on additional online social sites, I’d like to keep
    up with everything fresh you have to post. Could you make a list of every one of your communal sites like your twitter feed, Facebook page or linkedin profile?

Leave a Reply

Your email address will not be published. Required fields are marked *