+ 3

Strings in c

how many ways I can write strings including spaces?

8th Oct 2018, 9:28 AM
Abdullah Mohammed
7 ответов
+ 6
256 possible chars: 2^8 possible different bit representations, because one bit is either 0 or 1 (so 2 possibilities) and a char has 1 byte = 8 bit of memory 256^(length of string): because of possible chars explained above and all chars possible at each place of the string plus terminator at the end of (after) the string
8th Oct 2018, 10:50 AM
Matthias
Matthias - avatar
+ 3
256^(length of string), if I understood correctly
8th Oct 2018, 9:40 AM
Bebida Roja
Bebida Roja - avatar
+ 3
why did u put 256
8th Oct 2018, 10:05 AM
Abdullah Mohammed
+ 3
unfortunately I don't 😅
8th Oct 2018, 10:08 AM
Abdullah Mohammed
+ 3
thanks mate
8th Oct 2018, 11:05 AM
Abdullah Mohammed
+ 1
you should know it
8th Oct 2018, 10:08 AM
Bebida Roja
Bebida Roja - avatar
+ 1
256 is used because the digits from 0 - 255 represent the ascii characters (0x00 - 0xFF hex).
8th Mar 2019, 1:53 PM
Roger Greenlaw