What will be the output of following C++ code? #include <iostream> using…

PYQ DSSSB 2022

What will be the output of following C++ code?

#include <iostream>
using namespace std;
int main()
{
  int x = 10;
  int y = 10;
  if (!(x ^ y))
    cout << " x is equal to y ";
  else
    cout << " x is not equal to y ";
  return 0;
}
  1. A.

    x is equal to y

  2. B.

    x is not equal to y

  3. C.

    Compilation error

  4. D.

    Run time error

Attempted by 505 students.

Sign up free to check your answer

Sign up free

Explore the full course: Dsssb Tgt Computer Science Paper 2

Loading lesson…