Hi,
For Unix/Linux Platform use curses Library [ curses.h ]
For MS-DOS use the following code and make sure that the following conditions,
1. Printable character within (24,80) length.
2. Remove all new line("\n") character in the printf statement.
3. Use Common column value for all input.
Code:
#include <stdio.h>
#include <conio.h>
void main()
{
char fname[20],sname[20];
int age;
clrscr();
printf("Please fill out the following form...\n");
printf("");
gotoxy(5,3); /* gotoxy(column,row); */
printf("------------------------------------------------------------");
gotoxy(5,4);
printf("|First Name: |");
gotoxy(5,5);
printf("|Surname : |");
gotoxy(5,6);
printf("| |");
gotoxy(5,7);
printf("|Race : |");
gotoxy(5,8);
printf("|Age : |");
gotoxy(5,9);
printf("|Height : |");
gotoxy(5,10);
printf("|Weight : |");
gotoxy(5,11);
printf("|Eye Color : |");
gotoxy(5,12);
printf("| |");
gotoxy(5,13);
printf("|Alignment : (Good, evil, neutral) |");
gotoxy(5,14);
printf("| |");
gotoxy(5,15);
printf("| |");
gotoxy(5,16);
printf("|Preferred Weapon Profeciency : (Sword, Mace, Axe, Staff)|");
gotoxy(5,17);
printf("| |");
gotoxy(5,18);
printf("| |");
gotoxy(5,19);
printf("| |");
gotoxy(5,20);
printf("| |");
gotoxy(5,21);
printf("|------------------------------------------------------------");
gotoxy(18,4);
gets(fname);
gotoxy(18,5);
gets(sname);
gotoxy(18,8);
scanf("%d",&age);
}
Note : I have verified using Turbo C++ 3.0 and the output is perfect.