201k views
2 votes
Which of the following will cause asyntax error?(0 < num)&& (num <12)0 < num <120 < num&& num < 12num > 0&& num <12

User Veneta
by
8.5k points

1 Answer

5 votes

Answer:

The answer to this question is that none of the following will give syntax error.All of them will get executed.

(0 < num)&& (num <12)

0 < num <12

0 < num&& num < 12

num > 0&& num <12

There is no syntax error i have checked on the compiler also.But logically we take variable on the left side of the comparison operator and the value to the right of the operator.

User Alexis Zapata
by
8.9k points