Question: 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
 The following code will not compile. Why? int x=40; int y=40;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!