+ 2
How can we compare string inside if statement.
I want to print "hello" in the code when char a="Eath " please help me in this code . https://code.sololearn.com/cCDLCnFlz28P/?ref=app
2 Answers
+ 9
You need to use strcmp function to compare two strings.
You need to use cstring library for that function.
This function will return 0 if both strings are equal.