Okay this is my first post on these forums with a very basic problem i have run into. I cannot seem to understand why my strings will not recognize each other as being the same. if i have code
char a[] = "test";
char b[] = "test";
if(a == b){
printf("%S", a);
}
else
return (0);
it will not print out a. Is this because the compiler cannot recognize these strings as equal by address or am i just writing the code wrong? Any answers would be great! thanks
char a[] = "test";
char b[] = "test";
if(a == b){
printf("%S", a);
}
else
return (0);
it will not print out a. Is this because the compiler cannot recognize these strings as equal by address or am i just writing the code wrong? Any answers would be great! thanks