How do char arrays work in C?

Posted by eSKay on Stack Overflow See other posts from Stack Overflow or by eSKay
Published on 2010-03-24T16:00:03Z Indexed on 2010/03/24 16:03 UTC
Read the original article Hit count: 321

Filed under:
|
|
|
#include<stdio.h>
int main()
{
  char a[5]="hello";
  puts(a);  //prints hello
}

Why does the code compile correctly? We need six places to store "hello", correct?

© Stack Overflow or respective owner

Related posts about c

    Related posts about char