What will be the output of the following C code?
#include <stdio.h>
int main()
{
char *a[1] = {"hello"};
printf("%s", a[0]);
return 0;
}
#include <stdio.h>
int main()
{
char *a[1] = {"hello"};
printf("%s", a[0]);
return 0;
}
A. Compile time error
B. hello
C. Undefined behaviour
D. hellon
Answer: Option B
Join The Discussion