source file name: fruit.cpp

#include <iostream.h>
#include <string.h>
#include< conio.h>

int main ()
{
  char fr[] = "mango";
  char frname[50];
  int n;
  clrscr();
  do {
     cout<<"What is my favourite fruit? ";
     cin>>frname;
     n= strcmpi (fr,frname);
  } while (n!= 0);
 cout<<"Answer is correct!!"<<endl;
 getch();
  return 0;  
}  

output: