Pls help me to understand this error

In this question of i compare values of char c with a and z like this:
if(“a”<=c && c<=“z”)
then it gives error but as soon as i do like this:
if(‘a’<=c && c<=‘z’) i.e use single quotes it doesnt give error

hi @kunal81198 double quotes are used for strings, single quotes are used for characters. You cannot compare a character with a string and that is why error arises in the first syntax.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.