Comments in C Programming Language
In this post, We will learn about comments in C programming language. We wirite comments in our to make it more readable on easily unstable. A comment never executed as part of the program means compiler ignore it.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
Previous: First Program In C Next: Data Type in C
In this post, We will learn about comments in C programming language. We wirite comments in our to make it more readable on easily unstable. A comment never executed as part of the program means compiler ignore it.
Type of Comment in C
- Single line Comment
- Multiline Comment
Single line Comment
Single line comments start with a double forward slash (//)
// this is a single line comments compiler will ignore it
Multiline Comment comments
In C programming multiline comments start with a forward slash and star (/*) and end with a star and forward slash(*/).
/* this is a single line comments compiler will ignore it * Compiler will ignore it */Example
/* This is Hello world program
* It will print Hello World on terminal
*/
#include <stdio.h> // including header file in program
int main() // main function the program
{
printf("Hello World"); // printing Hello World on terminal
return 0; // Returning 0
}
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
Previous: First Program In C Next: Data Type in C
Great explanation. Very use to understand with beginners.
ReplyDeleteThanks. We will write more tutorials here in the future. meanwhile, if you want to share an article with us please mail your article at rozgardesh@gmail.com we will be happy to publish that.
DeleteHelpful
ReplyDeleteThanks. We will write more tutorials here in the future. meanwhile, if you want to share an article with us please mail your article at rozgardesh@gmail.com we will be happy to publish that.
DeleteYou shares a lot of useful information about technology. Thank you for sharing this with us and keep sharing more like this.
ReplyDeleteC++ Training in Chennai
C C++ Training in Chennai
core java training in chennai
javascript training institute in chennai
javascript training in chennai
core java training in chennai
core java training