QUESTION
HoD have to find the name having registration number 103244 in the final year name list. Names will be in alphabetical order, Ho Dave to check each and every name in the namelist to identify the particular registration number.
ANSWER
#include <iostream>
#include <string.h>
using namespace std;
int main()
{
int k=0;
char n[16][20];
for(int i=0;i<16;i++)
{
cin>>n[i];
if(strcmp(n[i],"Messi")==0)
k=1;
}
if(k==1)
cout<<"Messi appears once in the list";
else
cout<<"Messi not appears in the list";
return 0;
}