when any array(of int or char type) is made like this
char a[]="hello";
int b[20];
then is there two pointer variables made a and b which points to start of array?
and if yes then why this gives an error if i do as following
char a[];
a="hello";
but in case of following no error shows
string c;
c="hello";
please also explain how arrays of int and char are passed in functions.
what if a function returns a char *
. does this mean it will be pointing to a character or it means it'll point to a char array?