目前本站已有 十几万 份求职资料啦!


参数传递问题

10-16 00:00:09 来源:http://www.qz26.com 笔试题目   阅读:8949
导读:ATest.cpp: Defines the entry point for the console application.//参数传递问题include stdafx.hinclude iostreamusing namespace std;void fun(int a,int*b,int c,int* d){a ;(*b) ;b = new int(10);coutaaaa bendl;//地址coutbbbb *bendl;//5c ;d ;d = new int(5);coutdddd dendl;//地址coutdddd2 *dendl;//5}int main(int argc, char* argv[]){int a=2,b=3,c=4,d=5;int* p = d;fun(a,b,c,p);coutaendl;//2 值传递coutbendl;//4 指针传递coutcendl;//5 引用传递coutdendl;//5 引用传递 指向指针的引用cout*pendl;//10 引用传递 i
参数传递问题,标签:银行笔试题目,企业笔试题目,http://www.qz26.com

ATest.cpp: Defines the entry point for the console application.

//参数传递问题

include stdafx.h
include iostream
using namespace std;

void fun(int a,int*b,int c,int* d)

{

 a ;

 (*b) ;

 b = new int(10);

 coutaaaa bendl;//地址

 coutbbbb *bendl;//5

 c ;

 d ;

 d = new int(5);

 coutdddd dendl;//地址

 coutdddd2 *dendl;//5

}

int main(int argc, char* argv[])

{

 int a=2,b=3,c=4,d=5;

 int* p = d;

 fun(a,b,c,p);

 coutaendl;//2 值传递

 coutbendl;//4 指针传递

 coutcendl;//5 引用传递

 coutdendl;//5 引用传递 指向指针的引用

 cout*pendl;//10 引用传递 int(5)为整型初始化

// printf(Hello World!);

 return 0;

}


Tag:笔试题目银行笔试题目,企业笔试题目求职笔试面试 - 笔试题目
【字号: 】 【打印】 【关闭
下一条:笔试题海信
《参数传递问题》相关文章
最新更新
推荐热门
联系我们 | 网站地图 | 财务资料 | 范文大全 | 求职简历 | 财会考试 | 成功励志
Copyright 二六求职资料网 All Right Reserved.
1 2 3 4 5 6 7 8 9 10