title: Why break cannot be used with ternary operator?
body: <pre><code>while(*p!='\0' &amp;&amp; *q!='\0')
  {
          if(*p==*q)
          {
                 p++;
                 q++;
                 c++;
          }
          else
          break;
  }
  </code></pre>
  
  <p>I have written this using ternary operator but why its giving error for break statement?</p>
  
  <pre><code>*p==*q?p++,q++,c++:break;
  </code></pre>
  
  <p>gcc compiler gives this error: expected expression before ‘break’</p>