1 #include <iostream>
2 using namespace std;
3
4 int main(int argc, char * argv[]){
5 unsigned short int matrix[100] = {'1','2','3','4','5'};
6 char matrix2[1000] = "12345";
7 float dmatrix[4][7] = {
8 { 2.11, 2.22, 2.33, 2.44, 2.55, 2.66, 2.77 },
9 { 3.11, 3.33, 3.33, 3.44, 3.55, 3.66, 3.77 },
10 { 4.11, 4.44, 4.33, 4.44, 4.55, 4.66, 4.77 },
11 { 5.11, 5.55, 5.33, 5.44, 5.55, 5.66, 5.77 }
12 };
13 float * track;
14
15
16 cout << "First Martix "<< matrix << endl;
17 cout << "Second Matrix " << matrix2 << endl;
18 for(int i=0;i<5;i++){
19 cout << matrix[i] << endl;
20 }
21 for(int i=0;i<5;i++){
22 cout << static_cast<char>(matrix[i]) << endl;
23 }
24 for(int i=0;i<100;i++){
25 cout << &matrix[i] << endl;
26 }
27 for(int i=0;i<5;i++){
28 cout << "STRING " << reinterpret_cast<int *>(&matrix2[i]) << endl;
29 }
30 track = *dmatrix;
31 float * last = &dmatrix[3][6];
32
33 for(int count = 0; track <= last; track++){
34 cout << "Position ==>" << count++ << "\tMemory Location==>"<<track << "\tValue==>" << *track <<endl;
35 }
36 return 0;
37 }
38
39