我想从开头跳过 p {0,1,2,3}
,到{4,5,6,7}
等。我该怎么做?
#include <stdio.h>
int main() {
char td[6][4] = {
{0, 1, 2, 3},
{4, 5, 6, 7},
{8, 9, 10, 11},
{12, 13, 14, 15},
{16, 17, 18, 19},
{20, 21, 22, 23}
};
char* p = *td;
printf("Address of td: \t%p, value=%u\n", td, (int)**td);
printf("Address of p: \t%p, value=%u\n", p, (int)*p);
p++;
/* How do I skip to the start of {4,5,6,7} (ie to be pointing at 4) ? */
printf("Address of p: \t%p, value=%u\n", p, (int)*p);
return 0;
}