Please can anyone tell me what is wrong with my program? for all cases it is displaying not identical
#include <iostream> // program to check for identical strings using namespace std; int checkstring(char a[],char b[]) { for(int i = 0;a[i]!='/0'&& b[i]!='/0';i++) { if(a[i]!= b[i]) { return -1; //if the strings are not identical then return -1 is executed and } program terminates returning -1 which 'x' of main would capture } return 0; // the flow of control comes to return 0 only if the strings are identical } int main(void) { char a[100]; char b[100]; cout<<"enter the first string"<<endl;cin.getline(a,100); cout<<"Enter the second string"<<endl;cin.getline(b,100); int x = checkstring(a,b); if(x==-1) { cout<<"not identical"; } if (x==0) { cout<<"identical"; } return 0; }