小编abh*_*ari的帖子

我可以从二维数组中检索一维数组地址吗?

我是编程新手.此代码无法正常工作,即从二维数组中检索一维数组地址:

#include<stdio.h>

main() {
     int s[4][2] = {
                    { 1234, 56 },
                    { 1212, 33 },
                    { 1434, 80 },
                    { 1312, 78 }
                   };
     int i ;
     for ( i = 0 ; i <= 3 ; i++ )
         printf ( "\nAddress of %d th 1-D array = %u", i, s[i] ) ;
}
Run Code Online (Sandbox Code Playgroud)

c arrays data-structures

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

标签 统计

arrays ×1

c ×1

data-structures ×1