Cannot call void user defined function inside main function in C programming : <p>When I try to run the below program</p>

<pre><code>#include&lt;stdio.h&gt;
/* demo.c:  My first C program on a Linux */
void main()
{
    getString();
}

void getString()
{
    printf("Hello World");
}
</code></pre>

<p>I get the below error:</p>

<pre><code>sample.c:8:6: warning: conflicting types for ‘getString’ [enabled by default]
 void getString()
      ^
sample.c:5:5: note: previous implicit declaration of ‘getString’ was here
     getString();
</code></pre>

<p>I cannot find out why this error is showing in Compilation time.</p>

<p>Any help is greatly appreciated. Thanks in advance.</p>
