<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>comments in c | Student Projects</title>
	<atom:link href="https://studentprojects.in/tag/comments-in-c/feed/" rel="self" type="application/rss+xml" />
	<link>https://studentprojects.in</link>
	<description>Microcontroller projects, Circuit Diagrams, Project Ideas</description>
	<lastBuildDate>Sat, 10 Dec 2022 04:46:49 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.7</generator>
	<item>
		<title>Comments in C++</title>
		<link>https://studentprojects.in/software-development/cpp/c-tutorials-cpp/comments-in-c/</link>
					<comments>https://studentprojects.in/software-development/cpp/c-tutorials-cpp/comments-in-c/#respond</comments>
		
		<dc:creator><![CDATA[Shubhajna Rai]]></dc:creator>
		<pubDate>Wed, 07 Dec 2022 07:31:00 +0000</pubDate>
				<category><![CDATA[C++ Tutorials]]></category>
		<category><![CDATA[comments in c]]></category>
		<category><![CDATA[single line comments]]></category>
		<category><![CDATA[multi line comments]]></category>
		<guid isPermaLink="false">https://studentprojects.in/?p=9821</guid>

					<description><![CDATA[<p>A comment is a human-readable text in the source code that the compiler ignores. Any informative item that a programmer does not want to be executed might be inserted using comments. It could be to explain or make a piece of code more readable. It can also be used to prevent the execution of alternative</p>
<p>The post <a href="https://studentprojects.in/software-development/cpp/c-tutorials-cpp/comments-in-c/">Comments in C++</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>A comment is a human-readable text in the source code that the compiler ignores. Any informative item that a programmer does not want to be executed might be inserted using comments. It could be to explain or make a piece of code more readable. It can also be used to prevent the execution of alternative code after the debugging process is complete.</p>



<p>Comments can be singled-lined or multi-lined.</p>



<h3>Single Line Comments</h3>



<ul><li>Single-line comments are preceded by two forward slashes (/).</li><li>Any information after the slashes / on the same line will be disregarded (not performed) because it is unparsable.</li></ul>



<p>A single-line comment is used in this example.</p>



<pre class="wp-block-code"><code lang="cpp" class="language-cpp">#include &lt;iostream&gt;
 
int main()
{
    // This is a single line comment
    std::cout &lt;&lt; "Hello World";
    return 0;
}
</code></pre>



<h3>Multi-line comments</h3>



<ul><li>A multi-line comment begins with /* and terminates with */.</li><li>The compiler will discard any information between /* and */.</li></ul>



<p>A multi-line comment is used in this example.</p>



<pre class="wp-block-code"><code lang="cpp" class="language-cpp">#include &lt;iostream&gt;
 
int main()
{
    /* This is a
    multi-line
    comment */
 
    std::cout &lt;&lt; "Hello World";
    return 0;
}
</code></pre><p>The post <a href="https://studentprojects.in/software-development/cpp/c-tutorials-cpp/comments-in-c/">Comments in C++</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/cpp/c-tutorials-cpp/comments-in-c/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Comments in C language</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c-tutorials-c-tutorials/comments-language/</link>
					<comments>https://studentprojects.in/software-development/c-tutorials/c-tutorials-c-tutorials/comments-language/#respond</comments>
		
		<dc:creator><![CDATA[Chitra]]></dc:creator>
		<pubDate>Mon, 12 Sep 2011 17:16:47 +0000</pubDate>
				<category><![CDATA[C Tutorials]]></category>
		<category><![CDATA[c comments]]></category>
		<category><![CDATA[comments in c]]></category>
		<category><![CDATA[line comment]]></category>
		<category><![CDATA[block comment]]></category>
		<category><![CDATA[c comment]]></category>
		<category><![CDATA[c tutorial]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=2168</guid>

					<description><![CDATA[<p>Comments are merely program documentation which helps the reader to understand the code. The compiler ignores these comments when it translates the program into executable code. C language uses two different formats of comment 1. Block comment 2. Line comment 1. Block comment: A block comment is used when the comment will span several lines.</p>
<p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c-tutorials-c-tutorials/comments-language/">Comments in C language</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>Comments are merely program documentation which helps the reader to understand the code.<br />
The compiler ignores these comments when it translates the program into executable code.<br />
C language uses two different formats of comment<br />
<strong>1.	Block comment<br />
2.	Line comment</strong></p>
<p><strong>1. Block comment: </strong>A block comment is used when the comment will span several lines.<br />
<strong>Example:</strong></p>
<pre lang="c" escaped="true"> /*This is a block comment
                    that covers two lines*/</pre>
<p><strong><strong>2. Line comment:</strong></strong> The line comment uses two slashes (//).Programmers generally use this format for short comments.<br />
<strong>Example:</strong> </p>
<pre lang="c" escaped="true">//This is a single line comment</pre>
<p>Example program: </p>
<pre lang="c" escaped="true" line="1">
/*This is a Greeting program, which prints ‘Hello world’. 
This program demonstrates some of the components of a simple c program*/ 
#include “stdio.h”
#include “conio.h”
void main()
{
printf(“Hello World”);  //This statement prints Hello World
getch();
}//main()
</pre><p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c-tutorials-c-tutorials/comments-language/">Comments in C language</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/c-tutorials/c-tutorials-c-tutorials/comments-language/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
