Pages - GamesandApps

Adding Comments to Various Programming Languages

Adding comments in C, C++, Visual Basic and Java

Comments in C++ or Java-

The way to add comments in C++ or Java is exactly same.
Here are examples of a single comment and a double line comment :-



Single Line Comment-


// This is a single line comment. Adding comments does not effects the program. Use 2 slashes for it.

Multi Line Comment-


/* Its a double line comment.
Use slash and asterisk sign for starting and ending the comment like this. */


Comments in C-

The way to write single and multi line comment in C is like this.
/* This is the way to give single line comments. */
/* Well, single line and multi line comments in C are written in the same way.
Write anything in here, it's a comment.
ok it ends here. */


Comments in Visual Basic-

Alright this is how you add a comment to your VB code.
' Yes, a ( ' ) single inverted comma is used and then write your comment in the rest of the line.

So, This is the way by which we add comments to various programming languages. Hope you got the way for adding comments in the language you were searching for.

7 comments:

  1. I love programming alot when I was at first year but now em fit fedup
    flash games

    ReplyDelete
  2. Thank you for your post.Thanks Again. Cool. gamerbolt

    ReplyDelete
  3. You might comment on the order system of the blog. You should chat it's splendid. Your blog audit would swell up your visitors. I was very pleased to find this site.I wanted to thank you for this great read!! Eric

    ReplyDelete
  4. Im no expert, but I believe you just made an excellent point. You certainly fully understand what youre speaking about, and I can truly get behind that. coin master free spins

    ReplyDelete
  5. Really I enjoy your site with effective and useful information. It is included very nice post with a lot of our resources.thanks for share. i enjoy this post. fortnite free v bucks generator

    ReplyDelete
  6. i was just browsing along and came upon your blog. just wanted to say good blog and this article really helped me.
    代 寫 cs

    ReplyDelete
  7. Excellent article. Very interesting to read. I really love to read such a nice article. Thanks! keep rocking. best spy apps

    ReplyDelete