Help to write c code to implement the history features of shell(ANSI C)

Hi you have to explain your problem clearly to get a good response....

In linux or Unix system, in command promt when we press up or down key we get the previous used commands. Similarly I want to create my own shell (using c code)which acts like this. This is my actual problem.Plz help me.

Hi you have to explain your problem clearly to get a good response....

It's better to refer net because we are not that much of experts

You want to use a static char array or a dynamic array of char pointers? What do you think, maybe 50 rows, 80 char's each should be enough?