⚠ Switch to EXCALIDRAW VIEW in the MORE OPTIONS menu of this document. ⚠ You can decompress Drawing data with the command palette: ‘Decompress current Excalidraw file’. For more info check in plugin settings under ‘Saving’

Excalidraw Data

Text Elements

char c[4];

c[0] = ‘J’; c[1] = ‘O’; c[2] = ‘H’; c[3] = ‘N’;

Why this will not work?

J

O

H

N

GBX

GBX

GBX

6

5

4

3

2

1

0

How will the function know that this is last character?

Therefore, we add a null character to determine the end of string.

J

O

H

N

\0

GBX

GBX

6

5

4

3

2

1

0

end of string.

char c[5];

c[0] = ‘J’; c[1] = ‘O’; c[2] = ‘H’; c[3] = ‘N’; c[4] = ‘\0’;

This will work.