What will be the output of the following code? #include <iostream> using…
PYQ Infosys Hiring Test 2025
What will be the output of the following code?
#include <iostream>
using namespace std;
int main ()
{
int x = 0, y = 1;
for (; y; cout << ++x << y++ << " ")
{
x = y++ <= 15;
}
return 0;
}- A.
31,71,41,60,21
- B.
22 23 44 55
- C.
21 31 51 61
- D.
Infinite loop
Attempted by 79 students.
Sign up free to check your answer
Sign up freeLoading lesson…

