QUESTION IMAGE
Question
which of the following is a correct assignment statement? int b = -7; int 4 = c; int a = 2.4;
Brief Explanations
An integer assignment statement requires a valid variable name on the left and an integer value on the right. The first option uses a valid variable b and assigns an integer -7. The second option has an invalid variable name 4 (starts with a number). The third option assigns a non-integer 2.4 to an integer variable.
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
int b = -7;