title: C comparing char does not work
body: <p>we're supposed to code an householdbook, where we got a struct like this</p>
  
  <pre><code>typedef struct{
     struct Entry *before;
     char date[8];
     char type;
     float price;
     char comment[250];
     struct Entry *following;
  } Entry;
  </code></pre>
  
  <p>The first function you should call is </p>
  
  <pre><code>addEntry()
  </code></pre>
  
  <p>There you can add entries to the householdbook. When you put in the type, you say if its income or expense. My problem there is, that the if clause isn't comparing correctly, because it asks for new inout all the time.</p>
  
  <pre><code>do {
         printf("Income or Expense?: ");
         scanf(" %c", &amp;(ptr-&gt;type));
         printf("%c\n", ptr-&gt;type);
         if(ptr-&gt;type == 'i')
                ptr-&gt;type = "I";
         if(ptr-&gt;type == 'e')
                ptr-&gt;type = "E";
  } while(ptr-&gt;type != 'I' || ptr-&gt;type != 'E');
  </code></pre>
  
  <p>When I hit a letter on my keyboard, the <code>printf</code>function outputs the right one, but it never exits this <code>do{} while()</code>loop somehow also if i put a capital <code>'E'</code> or <code>'I'</code> in. And it never makes a small <code>'e'</code> or <code>'i'</code> to a captial one.</p>