News for hackers. Stuff that matters.
Re:Fixing C Strings by Quis_sum on Sunday December 22, 2024 @09:38PM (#42491222)
s is still a pointer to character. This is just an optimised shorthand for (assuming ASCII):

char s[3];

Which is then initialised with: 0x48,0x69,0x00

There simply is no such thing as a string type in C.

All the "string" functions work on a char pointer which is incremented until it points to a 0.

There are no comments on this comment yet.