惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Hacker News - Newest:
Hacker News - Newest: "LLM"
S
Security Affairs
PCI Perspectives
PCI Perspectives
Google Online Security Blog
Google Online Security Blog
W
WeLiveSecurity
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Recent Commits to openclaw:main
Recent Commits to openclaw:main
P
Privacy & Cybersecurity Law Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
S
Security @ Cisco Blogs
Security Archives - TechRepublic
Security Archives - TechRepublic
Cyberwarzone
Cyberwarzone
L
Lohrmann on Cybersecurity
TaoSecurity Blog
TaoSecurity Blog
V
Visual Studio Blog
博客园 - 聂微东
Scott Helme
Scott Helme
博客园 - 【当耐特】
K
Kaspersky official blog
Security Latest
Security Latest
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
MyScale Blog
MyScale Blog
Schneier on Security
Schneier on Security
WordPress大学
WordPress大学
博客园 - 叶小钗
C
Check Point Blog
V2EX - 技术
V2EX - 技术
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - Franky
T
Tor Project blog
Apple Machine Learning Research
Apple Machine Learning Research
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
腾讯CDC
雷峰网
雷峰网
博客园_首页
美团技术团队
Y
Y Combinator Blog
C
CERT Recently Published Vulnerability Notes
AWS News Blog
AWS News Blog
月光博客
月光博客
N
Netflix TechBlog - Medium
Last Week in AI
Last Week in AI
Recent Announcements
Recent Announcements
Google DeepMind News
Google DeepMind News
Help Net Security
Help Net Security
P
Proofpoint News Feed
MongoDB | Blog
MongoDB | Blog
C
Cybersecurity and Infrastructure Security Agency CISA

博客园 - 刘伟_luvi

C项目错误情况小记 s3c2440设置从nfs或从board启动 Hash Functions for Hash Table Lookup 自写linux下的简单man帮助文件 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token Linux MAN命令 在本地计算机无法启动MySQL服务。错误1067:进程意外终止 嵌入式中地址-函数之间的转换 对C语言中结构体的测试分析 悄悄地,你走了 AMBA片上总线 Linux系统环境下的Socket编程详细解析 C语言宏定义技巧(常用宏定义)【转】 s3c2410 MMU详述 可重入函数与不可重入函数(转) 程序的书写规则(程序的编码规范) ARM中C和汇编混合编程及示例 嵌入式系统 Boot Loader 技术内幕(转) 关于Linux系统下网卡手写配置文件的介绍
C数组测试 - 刘伟_luvi - 博客园
刘伟_luvi · 2008-09-03 · via 博客园 - 刘伟_luvi

今天在VC6中测试一下数组的传址方式,发现在main函数中,数组名所指向的地址是与数组中每0个元素的地址相同,但当把数组传给被调函数时,被调函数的形参是以指针的形式接收实参的地址。

在下边的程序中,当你第一次运行的时候,看系统分配给array数组的地址是什么,然后更改程序;

2:把 printf("4:\t1245044==%s\n", 1245044);语句中的后边一个“1245044”更改为你的系统给你的array分配的地址,然后再运行一下看看。

1:把//#define DEBUG改为#define DEBUG

#include <stdio.h>
#include <string.h>
//#define DEBUG

int ArrayAddress(char caArray[])
{
 printf("2:\t&caArray==%d\tcaArray==%d\n", &caArray, caArray);
 return 0;
}

int main(void)
{
 char array[10]="Hello";

 printf("1:\t&array==%d\tarray==%d\n", &array, array);
 ArrayAddress(array);
 printf("3:\t&array==%d\tarray==%d\n", &array, array);
#ifdef DEBUG
 printf("4:\t1245044==%s\n", 1245044);
#endif
 return 0;
}