Turbo C++ - Unable to check EOF of input file AND extract different type data from input file to array

#include<iostream.h>
#include<fstream.h>
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
#include<string.h>
#include<ctype.h>
#include<math.h>
#include<strstrea.h>

struct kbcqbank
{
int qno;
char quest[60];
char opt01[30];
char opt02[30];
char opt03[30];
int key;
} kbq;

int main()

{
clrscr();
char fname[20], kline[150];

char qresp[1]="N", mesg[]="This is a test", ch;

kbcqbank p1[3];

int ctr, kcap, qctr, quizr, qpoints, qscore, handle;

char *errorcodes;

ifstream rfptr;

ofstream wfptr;

cout<<"Enter the question bank file name firstname.lastname ? ";

cin>>fname;

cout<<"Filename you want to read is "<<fname<<endl;

getch();
kcap=4;
handle=open("a.txt");
rfptr.open(fname);
cout<<handle<<mesg;
getch();
if(!rfptr)
{
	cout<<"Error opening the file "<<fname;
	getch();
	errorcodes=strerror(errno);
	cout << strerror(errno);
	cout << errorcodes<<endl;
	wfptr.open(fname);


	for(ctr=1;ctr<=kcap;ctr++)
	{
		cout<<"\n\nQuestion details "<<endl;
		cout<<"Enter Qno "<<endl;
		cin>>p1[ctr].qno;
		cout<<endl<<"Enter Question:"<<endl;
		cin>>p1[ctr].quest;
		cout<<"Option 01: "<<endl;
		cin>>p1[ctr].opt01;
		cout<<"Option 02: "<<endl;
		cin>>p1[ctr].opt02;
		cout<<"Option 03: "<<endl;
		cin>>p1[ctr].opt03;
		cout<<"Key: "<<endl;
		cin>>p1[ctr].key;
		printf("Qno %d Question %s Opt01 %s Opt02 %s Opt03 %s Key %d",p1[ctr].qno,p1[ctr].quest,p1[ctr].opt01,p1[ctr].opt02,p1[ctr].opt03,p1[ctr].key);
		getch();
		wfptr<<p1[ctr].qno<<p1[ctr].quest<<p1[ctr].opt01<<p1[ctr].opt02<<p1[ctr].opt03<<p1[ctr].key<<endl;

	}
	wfptr.close();
	getch();
}

else

{
            rfptr.open(fname);
	printf("File Status ");
	errorcodes=strerror(errno);
	cout << strerror(errno)<<" ->";
	cout << errorcodes<<endl;
	cout<<"File found, Now showing records"<<strerror(errno);
	getch();

	for(ctr=1;!rfptr.eof();ctr++)
	{
		printf("Question # %d ",ctr);
		rfptr>>kline;
		cout<<kline;
	};

	cout<<"Close\n";
	getch();
	rfptr.close();

}
    clrscr();
printf("Do you wish to start the Quiz (Y/N) ? ");
cin>>qresp;

if(qresp=="Y"|| qresp=="y")
{
	printf("Loading questions...\n");
	printf("Start Quiz...\n");
	getch();
	rfptr.open(fname);
	rfptr.close();
	qpoints=0;

            for(ctr=1;ctr<qctr && (qresp=="Y"|| qresp=="y"); ctr++)
	{
		clrscr();
		printf("\nQuestion # %d",p1[ctr].qno);
		printf("\nQuestion -> %s",p1[ctr].quest);
		printf("\mOption 02 -> %s",p1[ctr].opt01);
		printf("\nOption 03 -> %s",p1[ctr].opt02);
		printf("\nOption 03 -> %s",p1[ctr].opt03);
		printf("\nEnter the correct option 1, 2 or 3 ");
		cin>>quizr;

		if(quizr==p1[ctr].key)
		{
			qpoints=(10*qpoints)+(ctr*1000);
			printf("\n\nCorrect !!! Your score is %d ",qpoints);
			printf("\n\n\nDo wish to continue quiz (Y/N) ? ");
			cin>>qresp;
		}
		quizr=0;
	}

	printf("\n\n\nYour final score is %d ", qpoints);

}

getch();
return 0;

}

I am using a Borland C ++ 3.2 compiler.
Program purpose (quiz; as many question as user wants OR question bank has)
Input file structure is
Question num (int)
Question c60)
Option1 c30
Option2 c30
Option3 c30
Correct answer int

  1. Ask a file name and
    a. If input file is found then display all records
    b. Otherwise accept input into an array and write it to file

  2. Then load all the data from file (respective data type) to an array.

  3. Ask the user questions till he chooses to exit

  4. Show the score and exit.

Two errors/challenges i am facing

  1. It does not correctly check end of file and goes into endless loop
  2. Unable to load input file data to respective data types.

Please help as i need to submit my project and i m stuck.