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