每日一题(10)
上一篇 /
下一篇 2007-10-19 14:06:37
/ 个人分类:每日一题
17. The ____ operator returns True if either of its operands can be evaluated as True, but not both.
Your Answer: ____________________________
Answer:
The right answer here is the exclusive-or (xor) operator.
18. How does the identity ōperator === compare two values?
A. It converts them to a common compatible data type and then compares the resulting values
B. It returns True only if they are both of the same type and value If the two values are strings, it performs a lexical comparison
C. It bases its comparison on the C strcmp function exclusively
D. It converts both values to strings and compares them
Answer:
The identity operator works by first comparing the type of both its operands, and then their values. If either differ, it returns False—therefore, Answer B is correct.
导入论坛
收藏
分享给好友
管理
举报
TAG:
每日一题