I tried following code but I didn't getting desire output
char a[50];
char b[50] = "abc";
std::cin << a ;
if(a == b){
std::cout << "Matched!!" << std::endl;
}else{
std::cout << "Not Matched!!" << std::endl;
}
I'm getting "Not Matched!!" while I put input as "abc". Why this happend?
Aucun commentaire:
Enregistrer un commentaire