C语言函数参数压栈的顺序你清楚吗?
#include <stdio.h>
void stack_test1(int a, int b, int c);
int main(void)
{
int a = 1, b = 2, c = 3;
stack_test1(a, b, c);
return 0;
}
void stack_test1(int a, int b, int c)
{
printf("a = %d, &a = %#x \n", a, (unsigned int)&a);
printf("b = %d, &b = %#x \n", b, (unsigned int)&b);
printf("c = %d, &c = %#x \n", c, (unsigned int)&c);
}
该程序输出结果为:
a = 1, &a = 0x61fef0
b = 2, &b = 0x61fef4
c = 3, &c = 0x61fef8
-END-
免责声明:整理文章为传播相关技术,版权归原作者所有,如有侵权,请联系删除
华清远见沈阳
华清远见
IT知识我们超级专业,你确定不进来学几招再走么?
好看的你点个在看再走吧~~~