Comments in C Programming are to provide a piece of information about the code. A comment can helps the other programmers to understand the program flow. In C Programming Language, there are two types of commenting options, and they are Single Line and Multi-line.
Single Line Comment Example
The Single Line comments start with two forward slashes(//). In this program, we are displaying Hello World as the C Programming output. Here, we used a single line.
#include<stdio.h> int main() { // Printing Hello World Message as Output printf(" Hello World! \n"); return 0; }
Hello World!
C Multi-Line Comments Example
The Multi-Line Comments placed in between /*……… */. Use this Slash and asterisk to write a multi-line.
#include<stdio.h> int main() { /* Print Message as an Output */ printf(" Welcome to Tutorial Gateway \n"); return 0; }
