Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 4 (16pts) Assume the following declarations : char el, c2, 03: Write the necessary statements to shift the content of these 3 variables left.

image text in transcribed
Question 4 (16pts) Assume the following declarations : char el, c2, 03: Write the necessary statements to shift the content of these 3 variables left. This means that after your statements : ci should contain the value of c2, and c2 should contain the value of c3, and c should contain the value of ci. For example, if cl contained 'a', c2 contained 'b' and c3 contained 'c', then after your statements, cl should be 'b', e2 should be 'e' and c3 should be 'a'. Answer: Question 5 (24pts) What is the exact output produced by the following code segments. Clearly indicate spaces and line changes. A-12pts) char init-M, System.out.print("init is " + init): System.out.println( "but "); System.out.print("10.0/3 is "*10.0/3); Answer: D-12pts) int vi = 2; int V2-5; int res = 6; resvl++ 2- System.out.println("yl: + v ); System.out.println(); System.out.println(" v2: " + V2 -- zes: - + zes); Answer: COMP 248 - EE F2011 Test 1-A Page 3 of 4

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

Data Mining Concepts And Techniques

Authors: Jiawei Han, Micheline Kamber, Jian Pei

3rd Edition

0123814790, 9780123814791

More Books

Students also viewed these Databases questions