正在加载图片...
C++语言程序设计 include <iostream> Include <iomanip> using namespace std; void Array Truong p, nt np 指{mt 针 cout < In funC, address of array is < unsigned long(P)<< end 5 cout <<"Accessing array in the function 函 using pointers < endl 数 for (i=0; i<n; i++) {cout<<" Address for index"≤≤i<<" s ≤< unsigned long(P+ cout <<"Value is"<<*(P+i).<< endlC++语言程序设计 59 #include <iostream> #include <iomanip> using namespace std; void Array_Ptr(long *P, int n) { int i; cout << "In func, address of array is " << unsigned long(P) << endl; cout << "Accessing array in the function using pointers" << endl; for (i = 0; i < n; i++) { cout << " Address for index " << i << " is " << unsigned long(P+i); cout << " Value is " << *(P+i) << endl; } } 指 针 与 函 数
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有