Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

If $a = 12 what will be returned when ($a == 12) ? 5 : 1 is executed?

If $a = 12 what will be returned when ($a == 12) ? 5 : 1 is executed?
a) 12
b) 1
c) Error
d) 5

Answer: d
Explanation: ?: is known as ternary operator. If condition is true then the part just after the ? is executed else the part after : .

Join The Discussion