Question 31

What happens when you attempt to compile and run the following code?
#include <iostream>
using namespace std;
int main()
{
float x=3.5,y=1.6;
int i,j=2;
i = x + j + y;
cout << i;
return 0;
}
  • Question 32

    What happens when you attempt to compile and run the following code?
    #include <iostream>
    using namespace std;
    int main()
    {
    int i = 5;
    cout<<"Hello World" << ++i;
    return 0;
    }
  • Question 33

    Which of the following expressions decrement variable i by 2? (Choose two.)
  • Question 34

    Which of the following statements are correct?
  • Question 35

    What happens when you attempt to compile and run the following code?
    #include <iostream>
    using namespace std;
    int main()
    {
    int i=2;
    switch(i)
    {
    case 1:
    cout<<"Hello";
    break;
    case 2:
    cout<<"world";
    break;
    case 3:
    printf("End");
    break;
    }
    return 0;
    }