I have the following C code:
person->title
The title is a three byte char array. All I want to do is print those three bytes. I can't use the string formatter with printf because there is no null byte.
How can I print this out without having to copy it or add a null byte to it?
Thanks in advance!
UPDATE
Turns out it's not an array, just three adjacent bytes. If I try to compile with the code suggested:
person->title[0]
It fails with the error:
test.c:46: error: subscripted value is neither array nor pointer.