<?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>Function declaration | Student Projects</title>
	<atom:link href="https://studentprojects.in/tag/function-declaration/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:23:18 +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>Functions Declaration</title>
		<link>https://studentprojects.in/software-development/c-tutorials/c-tutorials-c-tutorials/functions-declaration/</link>
					<comments>https://studentprojects.in/software-development/c-tutorials/c-tutorials-c-tutorials/functions-declaration/#respond</comments>
		
		<dc:creator><![CDATA[Shubhajna Rai]]></dc:creator>
		<pubDate>Tue, 25 Oct 2022 08:41:02 +0000</pubDate>
				<category><![CDATA[C Tutorials]]></category>
		<category><![CDATA[Function declaration]]></category>
		<category><![CDATA[basic structure of a function]]></category>
		<guid isPermaLink="false">https://studentprojects.in/?p=9690</guid>

					<description><![CDATA[<p>A function has two components: Declarative statement in which the name, return type, and necessary parameters of the function are specified (if any). Definition, which is merely the function&#8217;s body (code to be executed) The basic structure of a function is, return_type functionName() { // declaration &#160; // body of the function (definition) } It</p>
<p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c-tutorials-c-tutorials/functions-declaration/">Functions Declaration</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p><strong>A function has two components:</strong></p>



<p>Declarative statement in which the name, return type, and necessary parameters of the function are specified (if any).</p>



<p>Definition, which is merely the function&#8217;s body (code to be executed)</p>



<p>The basic structure of a function is,</p>



<p>return_type functionName() { // declaration</p>



<p>&nbsp; // body of the function (definition)</p>



<p>}</p>



<p>It is frequently advised to separate the function&#8217;s declaration and definition for code readability and optimization.</p>



<p>This is also the reason why C programmes frequently include function definitions below the main() function and function declarations above it. The code will be better organised and simpler to comprehend as a result.Here&#8217;s how to accomplish it.</p>



<pre class="wp-block-code"><code lang="c" class="language-c">#include &lt;stdio.h&gt;
 
// Function declaration
void func();
 
int main()
{
    func(); // calling the function
    return 0;
}
 
// Function definition
void func()
{
    printf("This is the definition part.");
}
</code></pre>



<p>Output: This is the definition part.</p><p>The post <a href="https://studentprojects.in/software-development/c-tutorials/c-tutorials-c-tutorials/functions-declaration/">Functions Declaration</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/functions-declaration/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
