Fortune Telling Collection - Comprehensive fortune-telling - Write in C language, first save the names of students in a class, and then enter a name from the keyboard to find out if this person is a student in this class.

Write in C language, first save the names of students in a class, and then enter a name from the keyboard to find out if this person is a student in this class.

char name[ 100][ 10],s[ 10];

int f = 0;

The name input of class students is omitted;

scanf("%s ",s);

for(I = 0; I< 100; i++)

if(strcmp(name[i],s)==0)

f = 1;

f = 1; That man is a student in that class.

& ltstring.h & gt