Hello ,
Could you please tell me what is wrong in this code.
Code:#include <stdio.h> #include <string.h> int main(){ char list[5][8] = {"sankar", "sujeeth","Sravan", "Mahathi", "sanjana"}; char yourname[7]; int i, a; printf ("Enter you name"); scanf ("%s", yourname); for (i=0; i<5; i++) { a = strcmp(list[i][0], yourname); if (a == 0) printf ("Welcome , you can enter the palace\n"); break; } if (a != 0) printf ("Sorry, you are a trespasser\n"); return 0; }