a tricky bug: lost items --- #define LEN 4 int tape[LEN] = {6640, 5600, 3650, 0}; void search(int target) { queue_t q1; for(int i=0; i< LEN; i++) { enqueue(&q1, (void*)tape[i]); // this is hacky } void *tmp; while((tmp = dequeue(&q1)) != NULL) { if ((int)tmp == target) { printf("FOUND!\n"); return; } } printf("NOT FOUND!\n"); } int main() { search(5600); search(6640); }