The following code snippet gives unexpected output in Turbo C++ compiler:
char a[]={'a','b','c'};
printf("%s",a);
Why doesn't this print abc? In my understanding, strings are implemented as one dimensional character arrays in C.
Secondly, what is the difference between %s and %2s?