You are on page 1of 1

1) Compute the following expressions if x=3,y=4,z=5:

a. x>y||y<z
b. x%y+z==x+z
c. x/y+ ++z
d. (double)(x/y)+z
e. (double) x/y+z
f. !(y<=2) &&x%2==0

2) What is the result of the following expressions, if the values of x= 10, y=5, z=20 and A is defined as an integer?

1. A=x+y-z/2;
2. A=x*(y%2);
3. A=x++-y++;
4. A=--z+z--;
5. A=--y+ ++z-y++/x++;

3) Evaluate each of the following expressions if a is 5,b is 10,c is 15 and flag is 1:

 c==a+b || !flag;
 a!=7&& flag || c>=6;
 !(b<=12)&&a%2==0;
 !(a>5||c<a+b);

4) Evaluate the following expressions if x=12.5,y=9.2,m=5, and n=2

a. x/(float) m;
b. (double)(m*n);
c. (float)(m/n)+y;
d. (double)n/m+y;

You might also like