initialize variable while declaring a function : <p>I saw a code in which an int variable was declared in a function like</p>

<pre><code>int func(vector&lt;int&gt; a, int lum=0) {...}
</code></pre>

<p>I am looking for a idea or logic where anyone can use it..Cause it feels weird. Also tell me if it's right way to code or it was totally foolish of coder?c</p>
