Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. What is the values of (a, b, c, and x) after executing the following statements. int a = 3, b, c; double x

 

1. What is the values of (a, b, c, and x) after executing the following statements. int a = 3, b, c; double x = 3.7; a += 7; b=a+5; c=b/(int) x; c * = 6; 2. Correct the errors of the following java code. (6 errors) public class Assigl_2{ public static void main (String [ ] args) char ch = Z; float num# 1 45.8; int i = 4.9; = int incr=i+1; System.out.println("The value of the variable incr = "incr); }// end main }//end class

Step by Step Solution

3.43 Rating (150 Votes )

There are 3 Steps involved in it

Step: 1

1 int a 3 b c double x 37 a 7 a a 7 3 7 10 b a 5 b 10 5 15 c b int x c 15 3 5 after casting x to int c 6 c c 6 5 6 30 Values after execution a 10 b 15 ... 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

Fundamentals of quality control and improvement

Authors: amitava mitra

3rd edition

470226536, 978-1-11849164, 978-0470226537

More Books

Students also viewed these Programming questions

Question

what should you be aware of when inserting samples into end lanes?

Answered: 1 week ago