ch3-ArrayIdentifier (Array name and address of first element)

Chapter_3     Exercise_3-20 PointersAndBrackets     Exercise_3-21







ArrayIdentifier.cpp     TCP1, p. 198-199         download


#include <iostream>
using std::cout;
using std::endl;

int main()
{
int a[10];

cout << "a = " << a << endl;
cout << "&a[0] = " << &a[0] << endl;

return 0;
}
/*
g++ ArrayIdentifier.cpp -o ArrayIdentifier
./ArrayIdentifier
a = 0x7ffe8f201b70
&a[0] = 0x7ffe8f201b70
*/









Chapter_3     Exercise_3-20 BACK_TO_TOP PointersAndBrackets     Exercise_3-21



Comments

Popular posts from this blog

Contents