Attendance

QUESTION

There are three students Vino, Saravana and Virat in the class. You have to find the Vino in the attendance list.

ANSWER

#include <stdio.h>
struct emp{
    char name[30];
 };
int main()
{
struct emp e[10],temp;
  int i,j,n,h=0;
  char k[10];
  scanf("%d",&n);
  for(i=0;i<n;i++)
  {
  scanf("%s",e[i].name);
  }
   scanf("%s",k);
   for(i=0;i<n;i++)
  {
  if (strcmp (e[i].name,k)==0)
  {
    h=1;
    break;
  }
  }

  if(h==1)
    printf("Vino is exist");
  else
    printf("The Entered Name is not in the Directory");
	return 0;
}

ativador office 365

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

Powered By
100% Free SEO Tools - Tool Kits PRO