#include char ringbuffer[9][9]; //char matrix with size for 10char strings char myc1 ='h'; char myc2 ='w'; int nextToPut=0; int nextToGet=0; int nbrOfElements=0; void put(char c){ int pos=0; if(c!='\0'){ ringbuffer[nextToPut][pos]=c; pos++; nextToPut++; } } char* get(void){ int pos=0; if(nextToGet>0) if(ringbuffer[nextToGet]!=NULL){ nextToGet--; return ringbuffer[nextToGet]; } } int main(){ char* pChar; int i=0; put(myc1); pChar=get(); printf("char is :%s\n",pChar); } Output: char is :(null)