title: Remove even numbers from queue
body: <p>I got stuck when trying to remove even number from queue in C programming. Here is the code:</p>
  
  <p>My data structure for Queue:</p>
  
  <pre><code>typedef struct _listnode
  {
      int data;
      struct _listnode *next;
  } ListNode; // You should not change the definition of ListNode
  
  typedef struct _linkedlist
  {
      int size;
      ListNode *first;
  } LinkedList;   // You should not change the definition of LinkedList
  
  typedef struct _queue
  {
      LinkedList list;
  } Queue;
  </code></pre>
  
  <p>And I am calling from my main:</p>
  
  <pre><code>case 3:
          deleteEven(&amp;q); // You need to code this function
          printf("Result:\n");
          printList(&amp;q.list);
          break;
  </code></pre>
  
  <p>What I am trying to do is first, I tried to check if the queue is empty. Then I will get the linked list head and modulus with 2, if getting 0 means it's even number and then I will dequeue it from the queue. </p>
  
  <p>However, with these code, when I try to dequeue even numbers from queue, it just stopped working and not showing any error message.</p>
  
  <p>Anybody know how to solve this? Thanks in advance.</p>