Following program compiles fine in C with warnings but fails in compilation in C++. Why? What is the reason?
#include int main(void) { c
A valid string in C and C++ should have a \0 terminator and in
\0
char a[5]="Hello";
There is no space for null terminator and a is not a valid string.
So this might not be a error in C but you are bound to hit with issues when using in-built string functions like strlen() and family.
strlen()