title: Switch and adding char values to array
body: <p>I have problem with giving new char valure to array. I don't know why I get sign "&lt;" even when n is 12? My program should change expression <code>int char* tab = "93+"</code> to one value in this case <code>12</code>.</p>
  
  <pre><code>    char* tab = "93+";
      int b = sizeof (tab);
      char* tmp = new char[b] ;
      tmp [b-1] = '\0';
  
  
  if(isdigit(tab[i]) &amp;&amp; isdigit(tab[i+1]) ){
                 int n;             
                 if(tab[i+2]=='+' || tab[i+2]=='-' || tab[i+2]=='*'){
  
                    switch(tab[i+2]){
                      case '+':   
                      n = (tab[i]-'0') + (tab[i+1]-'0');
  
                      break;
  
                      case '-':
                      n = (tab[i]-'0') - (tab[i+1]-'0');
                      break;
  
                      case '*':
                      n = (tab[i]-'0') * (tab[i+1]-'0');
                      break;
                    }
                    tmp[i] = n+'0'; // I should have 12 but I get &lt;
                 }
  
                 else if (tab[i+2]!='+' || tab[i+2]!='-' || tab[i+2]!='*'){
                       goto LAB;
                 }
  }
  </code></pre>