Array-based queue implementation using C I wrote this header for generic use of a queue. The one thing I'm wondering is if I understood the usage of void*. I hope that if somebody teach me some conventions when coding in C.

/*
*   array-based queue implementation by using void*
*   written by kidkkr
*   May 6 '16
*/

#ifndef QUEUE_H
#define QUEUE_H
#define QUEUE_CAPACITY 10
#include &lt;stdio.h&gt;

typedef struct {
    void* data[QUEUE_CAPACITY];
    int head;
    int tail;
    int size;
} Queue;

void initQueue(Queue* pQueue)
{
    pQueue-&gt;head = 0;
    pQueue-&gt;tail = -1;
    pQueue-&gt;size = 0;
}

void enqueue(Queue* pQueue, void* item)
{
    if (pQueue-&gt;size == QUEUE_CAPACITY) // when queue is full
    {
        printf("Queue is full\n");
        return;
    }
    else
    {
        (pQueue-&gt;tail)++;
        (pQueue-&gt;tail) %= QUEUE_CAPACITY;
        (pQueue-&gt;data)[pQueue-&gt;tail] = item;
        (pQueue-&gt;size)++;
    }
}

void* dequeue(Queue* pQueue)
{
    // Return NULL when queue is empty
    // Return (void*)item at the head otherwise.
    void* item = NULL;
    if (isEmpty(&amp;pQueue))
    {
        printf("Queue is empty\n");
    }
    else
    {
        item = (pQueue-&gt;data)[pQueue-&gt;head];
        (pQueue-&gt;head)++;
        (pQueue-&gt;head) %= QUEUE_CAPACITY;
        (pQueue-&gt;size)--;
    }
    return item;
}

int isEmpty(Queue* pQueue)
{
    return pQueue-&gt;size == 0;
}

#endif
if (isEmpty(&amp;pQueue)) is wrong. It should be pQueue. You also need to have the prototype in scope before you use it. Put int isEmpty(Queue* pQueue) at the top of your file.