First I would want to know why,if I declare the following:
and then print:
it;s ok and even
Code:
printf("%c\n",a[1]);
is good
But when I replace the %c into %s so I get:
Code:
printf("%s\n",a[1]);
that's an error
I mean , why can;t it print bcd?
is it some logic point I missed or simply syntax?
Another question:
I have teh following declarations:
Code:
char *c[]={"door","me","pointers","balul"};
char **cp[]={c+3,c+2,c+1,c};
char ***cpp=cp;
And the following printing lines:
Code:
printf("%s\n",**++cpp);
printf("%s\n",++**cpp);
printf("%s\n",*cpp[-2]+3);
printf("%d\n",***cpp);
printf("%d\n",**cp);
Well I understand the 1st and 2ed lines, it;s the 3rd and 4th I dun quite get...
Why the 3rd line gives trash
And the 4rth gives "inters"?