Question #37831

What will be the value of i for the following expression :
int f=11, i=3 ;
i+=(f >3) ? i & 2:5 ;
1

Expert's answer

2013-12-19T08:47:54-0500

Answer on Question#37831- Programming, C++

1. What will be the value of ii for the following expression :


int f=11, i=3;
i+=(f>3) ? i & 2:5;


Solution.


#include <iostream>
using namespace std;
int main()
{
    int f=11, i=3;
    i+=(f>3) ? i & 2:5;
    cout<<i;
    system("pause");
    return 0;
}


i=5


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!
LATEST TUTORIALS
APPROVED BY CLIENTS