#include<stdio.h>
#include<stdlib.h>
main()
{
char a[32],*a1,b[64],*b1;
a1=&a[0];
b1=&b[0];
a1="hellohellohellohellohellohello" ;
printf("\n contents of a1: %s\n",a1);
int i =0;
for(i=0;i<=31;i++)
{
printf("%c",a[i]);
}
}
So why does printf ("%s",a1) work correctly while printf("%c",a) display junk ? Since a1 points to a[0], shouldn'it it display the same values ?