adplus-dvertising
frame-decoration

Question

Which of the following statements are correct about the C#.NET code snippet given below?

if (age > 18 || no < 11)
a = 25;

1. The condition no < 11 will get evaluated only if age > 18 evaluates to False.
2. The condition no < 11 will get evaluated if age > 18 evaluates to True.
3. The statement a = 25 will get evaluated if any one one of the two conditions is True.
4. || is known as a short circuiting logical operator.
5. The statement a = 25 will get evaluated only if both the conditions are True.

a.

1, 4, 5

b.

2, 4

c.

1, 3, 4

d.

2, 3, 5

Answer: (c).1, 3, 4

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Which of the following statements are correct about the C#.NET code snippet given below? if (age > 18 || no < 11) a = 25; 1. The condition no < 11 will get evaluated...