Cursor problem

I have written a program for which I intend the cursor to travel
by as much as the data field required.

for ex.
Name :             {I have declared name as a string[30] variable, hence
                    I would like the cursor to travel at most by 30 characters}

Any help or pointers as to how this can be done will be greatly appreciated.
Thanks in anticipation.

Eric Adu