当前位置:网站首页>C language two-dimensional array is called with one-dimensional array
C language two-dimensional array is called with one-dimensional array
2022-08-03 09:33:00 【smith342】
I knew that the two-dimensional array in C language is stored in the memory as a one-dimensional array, but I have never tried to use a one-dimensional array to call a two-dimensional array.
The output of the following code is:
17 24 17
8 42 22
17 24 17 8 8 42 22
I thought the compilation would report an error, but no error was actually reported.
#include#include#includeint main(){int arr[2][3];srand(time(0));for(int i=0;i<2;i++)for(int j=0;j<3;j++)arr[i][j]=rand()%50+1;for(int i=0;i<2;i++){for(int j=0;j<3;j++)//cout<
边栏推荐
猜你喜欢
DOM0、DOM2、DOM3 事件
二叉查找树的综合应用
When deleting a folder, the error "Error ox80070091: The directory is not empty" is reported. How to solve it?
Oracle 数据如何迁移到MySQL 图文详细教程
selenium IDE的3种下载安装方式
【LeetCode】112.路径总和
Cartesi 2022 年 7 月回顾
兔起鹘落全端涵盖,Go lang1.18入门精炼教程,由白丁入鸿儒,全平台(Sublime 4)Go lang开发环境搭建EP00
Flink Yarn Per Job - 启动AM
超详细的Asp.net使用SSL双向认证,一篇就够了
随机推荐
MySQL 主从切换步骤
chrome F12 network 保留之前请求信息
别人都不知道的“好用”网站,让你的效率飞快
STP生成树(端口状态+端口角色+收敛机制 )|||| STP优化技术( uplinkfast技术+Portfast技术+backbonefast技术 )详解
浅聊缓存函数
MySQL 免安装版的下载与配置教程
Oracle 数据如何迁移到MySQL 图文详细教程
10分钟带你入门chrome(谷歌)浏览器插件开发
多媒体数据处理实验2:PCA
Ultra-detailed Asp.net uses SSL two-way authentication, one article is enough
【LeetCode】zj面试-把字符串转换成整数
gpnmb+ gpnmb-AT2 cell idling mapping Epithelial cell idling mapping
Oracle 迁移至Mysql
Redis和Mysql数据同步的两种方案
bihash总结
Flink Yarn Per Job - 提交应用
二叉查找树的插入
【LeetCode】226.翻转二叉树
cnpm安装步骤
命令行加载特效 【cli-spinner.js】 实用教程