What will be the output ? [explain]
===================
#include <iostream>
int main(int argc, char** argv)
{
int x = 0;
int y = 0;
if (x++ && y++)
{
y += 2;
}
std::cout << x + y << std::endl;
return 0;
}
===================
a. 1
b. 2
c. 3
d. 4
e. undefined
===================
#include <iostream>
int main(int argc, char** argv)
{
int x = 0;
int y = 0;
if (x++ && y++)
{
y += 2;
}
std::cout << x + y << std::endl;
return 0;
}
===================
a. 1
b. 2
c. 3
d. 4
e. undefined