#include char ringbuffer[9][9]; //char matrix with size for 10char strings int nextToPut=0; int nextToGet=0; void put(char* c){ int i=0; while(i<9){ ringbuffer[nextToPut][i]=c[i]; i++; } printf("string copied\n"); nextToPut++; } char* get(void){ if((ringbuffer[nextToGet]!=NULL)){ nextToGet--; nextToPut--; return ringbuffer[nextToGet+1]; } else{ return NULL; } } int main(){ char* pChar; char* myString="hello"; char* myString2="hellow"; put(myString); put(myString2); pChar=get(); printf("char is:%s\n",pChar); pChar=get(); printf("char is:%s\n",pChar); }