🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Data Representation: all 9 questions

Quiz: Data Representation · Question 9 of 9

What does this print? (code)

What does this print?

print(len("₹500".encode("utf-8")))
  1. A.4
  2. B.6
  3. C.5
  4. D.8
Answer & explanation

Correct answer: 6

₹ takes 3 bytes in UTF-8 and each ASCII digit takes 1 byte: 3 + 3 = 6.

Can you get the rest right without peeking?

Take the timed Quiz: Data Representation quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →