Skip to content

✂️ Define String without null terminator

Feldwor edited this page Nov 13, 2021 · 1 revision

❌ Never use this in your code.

This is an invalid and ongoing discussion on what will happen if string without null terminator is introduced in the code.

void main(){
	char s[6] = {'s', 't', 'r', 'i', 'n', 'g'};
}

Footnotes

https://stackoverflow.com/questions/3828307/defining-a-string-with-no-null-terminating-char-0-at-the-end

Learning and Reference of C language. Public Domain.
Also available in CC0 or MIT License.

Clone this wiki locally