C/C++实例代码

[C/C++实例代码]C++指向数组的指针

#include iostreamusing namespace std;int main () {// an array with 5 elements.double balance[5] = {1000.0, 2.0, 3.4, 17.0, 50.0};
发布时间:2023-10-11  

[C/C++实例代码]C++访问数组元素

#include iostreamusing namespace std;#include iomanipusing std::setw;int main () {int n[ 10 ];// n is an array of 10 integers
发布时间:2023-10-11  

[C/C++实例代码]C++字符串

#include iostreamusing namespace std;int main () {char greeting[6] = {H, e, l, l, o, \\0};
发布时间:2023-10-11  

[C/C++实例代码]C++指针

// #include iostreamusing namespace std;int main () {intvar1;char var2[10];cout Address of var1 variable: ;
发布时间:2023-10-11  

[C/C++实例代码]C++使用指针

#include iostreamusing namespace std;int main () {intvar = 20;// actual variable declaration.
发布时间:2023-10-11  

[C/C++实例代码]C++ NULL指针

#include iostreamusing namespace std;int main () {int*ptr = NULL;cout The value of ptr is ptr ;
发布时间:2023-10-11