This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Why is string defined with half '0's?

Hi,

I see the following C lines on a ARM M4 Cortex CPU. It is new for me to see those interleaved '0's among character letters.

Could you explain it to me?

 

Thanks,

 

 

 

 

 

 

const uint8_t g_pui8ControlInterfaceString[] =

{ 2 + (21 * 2), USB_DTYPE_STRING,

’A’, 0, ’C’, 0, ’M’, 0, ’ ’, 0, ’C’, 0, ’o’, 0, ’n’,

0, ’t’, 0, ’r’, 0, ’o’, 0, ’l’, 0, ’ ’, 0, ’I’, 0, ’n’,

0, ’t’, 0, ’e’, 0, ’r’, 0, ’f’, 0, ’a’, 0, ’c’, 0, ’e’, 0

};

0