Answered step by step
Verified Expert Solution
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 ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started