• Post author:
  • Post category:Blog
  • Reading time:1 mins read
  • Post last modified:June 12, 2024

A programmer uses an operator to compare two variable values within a program. The variable A is assigned a value of 5 and the valuable B is assigned a value of 7. Which condition test syntax would have provided the result of “true”?

  • A >= B
  • A == B
  • A > B
  • A != B
    Answers Explanation & Hints:

    ==  represents equal
    !=   represents not equal
    <    represents less than
    >    represents greater than
    <=  represents less than or equal to
    >=  represents greater than or equal to

    Because 5 is not equal to 7, the resulting output is “true”.

Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments