1 Replies - 394 Views - Last Post: 13 June 2019 - 02:06 AM Rate Topic: -----

#1 HariNagarjuna   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 12-June 19

Character array and string

Posted 12 June 2019 - 11:34 PM

This is what I understood about difference between strings and array of characters so far and unicode(U+0000 to U+FFFF).

1.Unicode is combination of 0's and 1's and gives 65,536(2^16 or 16^4) characters.

2.character array can only contain this 65,536 unicode characters.

3.String can have things other than unicode characters in BMP(65,536 characters).

please correct me if I am wrong.
Is This A Good Question/Topic? 0
  • +

Replies To: Character array and string

#2 g00se   User is offline

  • D.I.C Lover
  • member icon

Reputation: 3635
  • View blog
  • Posts: 16,702
  • Joined: 20-September 08

Re: Character array and string

Posted 13 June 2019 - 02:06 AM

Quote

1.Unicode is combination of 0's and 1's and gives 65,536(2^16 or 16^4) characters.

Everything in computers is 1s and 0s. There is not really a limit on the number of Unicode characters. It's constantly evolving and therefore needs to be extended

Quote

2.character array can only contain this 65,536 unicode characters.

In effect yes, as the datasize of char is 65,536 bits

Quote

3.String can have things other than unicode characters in BMP(65,536 characters).

Not really. In the sense that there are 'holes' in Unicode and a string could contain one of these holes then, yes.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1