I was actually trying to compare a single letter of 2 character arrays using the strcmp function. If the letter was the same, it would print “Awesome!” In this case, it should print “Awesome” along with the lengths because the first letter of “Sneha” and “Sasha” is the same. But instead, it’s giving me heaps of errors. I tried googling it up but was unable to understand. The code along with the errors is in image format.
@kunal361 I tried converting char to char but it gives an error: cannot convert char* to char*
Tried your second suggestion (with char not char*) by directly using == and it worked!
And not only that, (with char not char*) when I modified the program slightly by removing the indices and making strcmp compare 2 strings instead of 2 characters, I noticed that strcmp seems to work when comparing 2 strings, but not 2 characters. Is it true?