Hi their, I am learning C and a bit stuck on pointer to strings(I now they dont really exist in c but yeah) which i saw in the absolute guide to c programmig book. I am wondering why this code below doesnt work? If you could answer this question it would be really helpful thanks.
#include <stdio.h>
main(){
char * list[4] = {"tom", "john", "albert", "lily"};
char answer[10];
printf("enter your name");
scanf("%s", answer);
int i;
for(i = 0; i <4 ; i++){
if(answer == list[i]){
printf("found");
}
else{
printf("not found");
}
}
}