11.Determine the final value of each of the following Boolean expression. Assume that the variables a, b and c are declared as integer data types and the variables ch1 and ch2 as character types. The...





11.Determine the final value of each of the following Boolean expression. Assume that the variables a, b and c are declared as integer data types and the variables ch1 and ch2 as character types. The variables are initialised with the following data:


int a = 4, b = 3, c = –2;


ch1 = ‘a’, ch2 = ‘b’;





(a) exp1 = (a <>c);


(b) exp2 = (a > b) || (ch1 != ch2) && ( a <>


(c) exp3 = ( a == b ) || ( ch1 == ch2) && ( a


(e) exp5 = !( ch1 >= ch2 ) || (a >= c) && (b >= c); (f) exp6 = ( a == b) && ( a > b) && !( ch1


(g) exp7 = ( a+b * c) > ( a*c);


(h) exp8 = (( a % 5 ) + (b / c) + (a + b)) <=>


(i) exp9 = (!(ch1 <=><=>=b)); (j) exp10 = (a % b+b % c+a % c) == (a / b+b / c+a / c);


(k) exp11 = !((a*b) + ( a*c)) <=>








May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here