Answer the question
In order to leave comments, you need to log in
Why does gcc printf(%s, array) correctly output a char array that is not a NULL-terminated string?
#include <stdio.h>
int main() {
char foo[6] = {"123456"};
printf("%s", foo); // 123456
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question