A

Admin • 833K Points
Coach

Q. What will the following code print?

Code:
let greeting = "Hello"
print(greeting.uppercased())
  • (A) HELLO
  • (B) hello
  • (C) Hello
  • (D) Error
  • Correct Answer - Option(A)
  • Views: 18
  • Filed under category Swift (iOs)
  • Hashtags:

Explanation by: Admin

`uppercased()` converts all letters in the string to uppercase.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.