小编kan*_*aya的帖子

为什么`*(multi + row)`生成指针地址而不是值?

为什么要*(multi + row)生成指针地址而不是值?我很困惑,但必须有一个很好的解释,但我不知道.

#include <stdio.h>
#define ROWS 5
#define COLS 10
int multi[ROWS][COLS];
int main(void)
{
    int row, col;
    for (row = 0; row < ROWS; row++)
    {
        for (col = 0; col < COLS; col++)
        {
            multi[row][col] = row*col;
        }

    }
    for (row = 0; row < ROWS; row++)
    {
        for (col = 0; col < COLS; col++)
        {
            printf("\n%d ",multi[row][col]);
            printf("%d ",*(*(multi + row) + col));
        }
    }
    return 0;
}
Run Code Online (Sandbox Code Playgroud)

c pointers multidimensional-array

1
推荐指数
1
解决办法
160
查看次数

什么是iOS中的替换Segue?

我知道怎么做,但我需要知道细节,内部.它与模态segue有什么不同?

从代码中替换segue

ios segue

0
推荐指数
1
解决办法
3776
查看次数

标签 统计

c ×1

ios ×1

multidimensional-array ×1

pointers ×1

segue ×1