What will be the output of below C program?
char arr = "skill";
if(arr == "skill")
no error no output
compile time error lvalue required.
You cannot compare equality of two strings with == operator. == operator will check the address of two strings, which will not be equal in this case. so if condition fails and prints "different".
Back To Top