title: comparing integers in c
body: <p>I have a problem comparing integers. I know that in C you can compare string using strcmp. I am looking for a way to compare integers in an array. I found an example online but it compares strings. I can seem to find a way to changed into integers</p>
  
  <p>I was wondering if I can get some help changing the code below to compare integers. </p>
  
  <pre><code> char sname[30]; int  i;
  
  printf("Please enter the class numbers:\n");
  scanf("%s", &amp;sname);        
  for (i = 0; i&lt;tail; i++)
      if (strcmp(sname, classschedule[i].classNumber) == 0) 
      {           
          return i;
      }
  </code></pre>