05.07.2012, 11:47

Why is it outputting random numbers instead of what's in the array? I've never worked with arrays until now.
gArray[][]={
{"Ganton", 1 ,2 ,3},
//...
gArray[0][0]='G';
gArray[0][1]='a';
gArray[0][2]='n';
gArray[0][3]='t';
gArray[0][4]='o';
gArray[0][5]='n';
gArray[0][6]='\0'; // same as gArray[0][7]= 0
gArray[0][7]='1';
gArray[0][8]='2';
gArray[0][9]='3';
printf("%s",gArray[0][0])//will print the string from place gArray[0][0] to the last place where it sees '\0'
printf("%i",gArray[0][0])// this will print Iniger value of a char( form ascii table)