title: how use string in switch statement in c programming?
body: <p>when i tried to compile this code my compile shows an error saying </p>
  
  <blockquote>
    <p>" error: case label does not reduce to an integer constant"</p>
  </blockquote>
  
  <p>Please tell me where I am doing the mistake. </p>
  
  <pre><code>void main()
  {
      int i,a,b;
      char c[10];
  
      printf("\n Input length  of sides in (a,b) format \n");
      scanf("(%d,%d)",&amp;a,&amp;b);
  
      printf("\n calculate -");
  
      while(c[10]!="Area\0" || "Perimeter\0")
      {
          scanf("%s",c[10]);  
      }
  
      switch(c[10])
      {
          case "Area":
              area(a,b);
              break;          
          case "Perimeter":
              perimeter(a,b);
              break;
      }
  }
  </code></pre>