PHP MCQ PHP Basic MCQ Question #2357
Single Choice Not Set

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

ID: #2357 PHP Basic MCQ 10,136 views
Question Info
#2357Q ID
Not SetDifficulty
PHP Basic MCQTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A 12
  • B 1
  • C Error
  • D 5
Correct Answer

Explanation

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

Share This Question

Challenge a friend or share with your study group.