#include #include char ringbuffer[9][9]; //char matrix with size for 10char strings int nextToPut=0; int nextToGet=0; void put(char* c){ while(strcmp(ringbuffer[nextToPut], c)); 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"; put(myString); pChar=get(); printf("char is:%s\n",pChar); }