Предположим, что
int *p;
int a = 100;
p = &a;
Что будет делать следующий код и как?
p++;
++p;
++*p;
++(*p);
++*(p);
*p++;
(*p)++;
*(p)++;
*++p;
*(++p);
Я знаю, это довольно беспорядочно с точки зрения кодирования, но я хочу знать, что произойдет на самом деле, когда мы будем писать так.
Примечание. Предположим, что адрес a=5120300
, он хранится в указателе p
, адрес которого 3560200
. Теперь, каково будет значение p & a
после выполнения каждого оператора?