Q. What will be displayed by print(ord(‘b’) – ord(‘a’))?

  • (A) 0
  • (B) 1
  • (C) -1
  • (D) 2
πŸ’¬ Discuss
βœ… Correct Answer: (B) 1
Explanation: ascii value of b is one more than a. hence the output of this code is 98-97, which is equal to 1.

Explanation by: Mr. Dubey
ascii value of b is one more than a. hence the output of this code is 98-97, which is equal to 1.

πŸ’¬ Discussion

πŸ“Š Question Analytics

πŸ‘οΈ
478
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
96%
Success Rate