Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1 (a). Which of the following is a correct statement that declares new float variables x, y, z and initializes them all to the value

1 (a). Which of the following is a correct statement that declares new float variables x, y, z and initializes them all to the value 7.2? A. float x = float y = float z = 7.2; B. float x = y = z = 7.2; C. float x, y, z = 7.2; D. float x = 7.2, y = 7.2, z = 7.2;

(b) refer to the following code. Assume a is an int

1 int exp = ( int ) ( Math . pow (2 ,5) - Math . round (6.13)); 2 switch ( a ){ 3 case 13: System . out . print (" Hello ! "); 4 case 5: System . out . print ( a ++); 5 case 0: break ; 6 case 14: System . out . print ("Bye. "); 7 default : System . out . printf (" Value : %10 d.", exp ); 8 }

Which cases are visited in the above code if a = 13? A. 13, 5, 0 B. 13 C. 13, 14 D. 13, 5, 14, default

What is the output of the above code if a = 0? A. Same output as when a = 13. B. Bye. C. 0 D. There is no output

What is the output of the above code if a = 7? A. Value: %10d. B. Value: 26. C. Value: 19. D. Value: 25.

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

C++ Database Development

Authors: Al Stevens

1st Edition

1558283579, 978-1558283572

More Books

Students also viewed these Databases questions

Question

1. Identify three approaches to culture.

Answered: 1 week ago

Question

2. Define communication.

Answered: 1 week ago