Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is spacebar a character?

Consider this line of text:

First line of text.

If a character array string is used to load the first TEN characters in the array it will output as:

First lin'\0'

First contains 5 letters, lin contains 3 letters. Where are the other two characters being used?

Is \0 considered two characters?

Or is the space between the words considered a character, thus '\0` is one character?

like image 704
EngGenie Avatar asked Nov 27 '22 21:11

EngGenie


1 Answers

Yes, space is a character. In ASCII encoding it has code number 32.

like image 182
Vladimir F Героям слава Avatar answered Dec 22 '22 01:12

Vladimir F Героям слава