次のプログラムでは、
int main()
{
char a[] = "azmruf";
char *ptr = a;
ptr += 5;
//Now ptr points at 'f'
printf("%c", --*ptr--); //e got printed. Bcos of post increment now ptr in u.
printf("%c", *ptr); // so 'u' got printed now.
// Next --*--ptr becomes --*(--ptr),
// ptr is moved to r, then --r i.e q is printed, but pointer should
// be in 'r'
printf("%c", --*--ptr);
//Im here getting 'q' only instead of 'r'. There is no 'q' in my string.(??!!!)
printf("%c", *ptr);
return 0;
}
最後のprintf()で「q」を取得するにはどうすればよいですか??