Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The following code will not compile. Why? int x = 4 0 ; int y = 4 0 ; int ans = 0 ; if

The following code will not compile. Why?
int x=40;
int y=40;
int ans =0;
if )=(y
ans =x+10 :
10 is not an integer
Single-equals isn't the proper way to compare x and y
ans was not declared
This code is missing curly brackets
image text in transcribed

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

Database Marketing The New Profit Frontier

Authors: Ed Burnett

1st Edition

0964535629, 978-0964535626

More Books

Students also viewed these Databases questions

Question

What types of businesses would use process costing?Why?

Answered: 1 week ago

Question

socialist egalitarianism which resulted in wage levelling;

Answered: 1 week ago

Question

soyuznye (all-Union, controlling enterprises directly from Moscow);

Answered: 1 week ago