What is the difference between Symantic error and Logical error in C? : <p>1.</p>

<pre><code>   int a=6, b=5, c;
        a + b = c;
        printf("%d", c);
        return 0;
</code></pre>

<p>2.</p>

<pre><code>int calculateAreaRectangle(int height, int width)
    {
     return (height + width);
    }
</code></pre>

<p>which is symentic error and which is logical error?</p>

<p>My another question - Is it correct that symantic error is always detected during due to compilation? Please give some example.</p>
