fork download
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. int main() {
  6. string str("Тест"), str2("Тест"), str3("ТЕСТ");
  7. char var[] = "Тест";
  8. cout << (str == str2 ? "True" : "False") << endl;
  9. cout << (str == str3 ? "True" : "False") << endl;
  10.  
  11. cout << (str == var ? "True" : "False") << endl;
  12. cout << (str == "Тестироование" ? "True" : "False") << endl;
  13.  
  14. return 0;
  15. }
Success #stdin #stdout 0s 4192KB
stdin
Standard input is empty
stdout
True
False
True
False