Back To C++ String Manipulation Functions
//program to check two strings for equality using strcmp function in string.h #include
#include
#include
void main() { char a[20],b[20]; clrscr(); cout<<"enter string 1 "; cin>>a; cout<<"enter string 2 "; cin>>b; if(strcmp(a,b)==0) { cout<<"strings are equal "; } else { cout<<"strings are not equal "; } getch(); }