working of these two lines of code in the program : <pre><code>total+=!used[str[i]-'a'];
used[str[i]-'a']=1;
</code></pre>

<p>It is the condition for checking the characters and saving the value in the variable total.</p>
