Why can't a variable exceed more than 255 characters? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5

Why can't a variable exceed more than 255 characters?

4th Dec 2019, 7:38 AM
Taiwo Asiyanbi
Taiwo Asiyanbi - avatar
3 Answers
+ 5
I think you are talking about characters. The size of char data type is 1 byte which means 8 bits. So 11111111 -> you add their place values you will get 255.
4th Dec 2019, 8:06 AM
Avinesh
Avinesh - avatar
+ 5
If any of your veriable is not able to exceed 255 value that means it is stored in 8 bits and rest Avinesh already explained
4th Dec 2019, 8:40 AM
Arsenic
Arsenic - avatar
+ 5
OK thanks sir 🙏
4th Dec 2019, 11:35 PM
Taiwo Asiyanbi
Taiwo Asiyanbi - avatar