Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

25. How many times will the following do-while loop be executed? int x=11; do{x+=20;} while (x 5 29. What will be the value of x

25. How many times will the following do-while loop be executed?

int x=11;

do{x+=20;} while (x<=100)

1

3

4

5

27. What will be the value of X after the following code is executed?

Int x=10;

Do {x*=20;} while (x<5);

10

200

This is an infinite loop

The loop will not be executed, the initial value of x>5

29. What will be the value of x after the following code is executed?

Int x=10, y = 20;

While (y <100) {x +=y;}

Y +=20;

90

110

130

210

31. Character literals are enclosed in _______; string liters are enclosed in ________.

Single quotes; single quotes

Double quotes; double quotes

Single quotes; double quotes

Double quotes; single quotes

33. What is the result of the following expression?

25/4+4 * 10 % 3

19

5.25

3

7

35. What will be displayed as a result of executing the following code?

Public class test

{public static void main (string [] args)

{ int value1=9;

System.out.printIn(value1);

Int value 2 = 45;

System.out.printIn(value2);

System.out.printIn(value3);

Value= 16;}}

9

45

16

94516

9 45 16

nothing, this is an error

37. To display the output on the next line; you can use the printIn method or use this escape sequence in the print method.

\t

\b

39. What will be the value of x after the following code is executed?

Int x= 10;

While (x <100);

{

x+= 10;

}

90

100

110

This is an infinite loop

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 2012 Proceedings Part 2 Lnai 7197

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284892, 978-3642284892

More Books

Students also viewed these Databases questions

Question

What would you do now if you were Norman?

Answered: 1 week ago

Question

10. Are you a. a leader? b. a follower? _______

Answered: 1 week ago