215k views
0 votes
Which line will be run?

A. The first line
B. The second
line
// 10 - 8 + 3
18 + 7 + 365
C. Both
D. Neither

User Hackio
by
4.3k points

1 Answer

5 votes

Answer:

The answer to this question is given below in the explanation section.

Step-by-step explanation:

The give code is:

// 10 - 8 + 3

18 + 7 + 365

the given lines of code, if you run it as it is given in the question then the answer is D. Because these lines will run by the compiler but give an error because these lines are not properly written.

However, if we consider, that these lines of codes are correct then the second line will run and the first line will not run because the first line is a comment. Before the beginning of the first line, there is a "//" that shows a comment line. it is a singal line comment and the compiler will not run the comment line.

User Demanzonderjas
by
4.1k points