Computer Science, asked by sdgngbbn, 2 months ago

if p=30,q=25,r=50 (p>=q) || !(r==q) && (r<p) Evaluate the Java Program ​

Answers

Answered by gyaneshwarsingh882
0

Answer:

Explanation:

The statement n += 4 is equivalent to:

++n

n=n+4 ✓

n+1

none

Question 2

What will be the output of a & b in the following, if int a, b; a=10; b=a++;

10,10

10,11

11,10 ✓

11,11

Question 3

What will be the output of a++ when int a = -1;

1

-1

0 ✓

none

Question 4

If int a = 25, b = 5, c = 0; what value is stored in c? When c = a % b;

5.0

5

0 ✓

none

Question 5

What is the result of the following in Java statement?

int m=8;

m*=8;

System.out.println("The output =" + m);

8

64 ✓

16

88

Question 6

double c;

int x, y, z;

x = 5; y = 10; z = 11;  

c = x*y+z/2;

The value stored in c is:

55.0 ✓

55.5

55

none

Explanation

   c = x * y + z / 2

⇒ c = 5 * 10 + 11 / 2

⇒ c = 5 * 10 + 5

⇒ c = 50 + 5

⇒ c = 55.0

Question 7

int m, p;

m = 5;

p = 0;

p = m-- + --m;

The output will be:

11

10

8 ✓

12

Explanation

   p = m-- + --m;

⇒ p = 5 + 3

⇒ p = 8

Similar questions