What will be the output of the program?
The code will not compile because in line 7, the line will work only if we use (x==y)
in the line. The == operator compares values to produce a boolean, whereas the =
operator assigns a value to variables.
Option A, B, and D are incorrect because the code does not get as far as compiling.
If we corrected this code, the output would be false.
Submit Your Solution hear: