58.2k views
3 votes
Which will be displayed when the application is run?

1) 1
2) 2.0
3) 2
4) A syntax error will be generated.

User Talysson
by
7.4k points

1 Answer

2 votes

Final answer:

The displayed value when the application is run is 2.

Step-by-step explanation:

The answer would be 3) 2.

When the application is run, the program will print out the value of the variable which is set to 2. So the output would be 2.0, but since the question asks for the displayed value and not the actual value, the decimal point will be dropped and it will be displayed as 2.

User Pratik Tiwari
by
7.7k points