- Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path16)pointers.cpp
23 lines (18 loc) · 584 Bytes
/
16)pointers.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include<iostream>
usingnamespacestd;
intmain()
{
float a = 2.2;
float *ptra;
ptra = &a;
cout << "The value of a is " << a << endl;
cout << "The value of &a is " << &a << endl;
cout << "The value of ptra is " << ptra << endl;
cout << "The value of *ptra is " << *ptra << endl;
a = 1.1;
cout << "The new value of a is " << a << endl;
cout << "The new value of &a is " << &a << endl;
cout << "The new value of ptra is " << ptra << endl;
cout << "The new value of *ptra is " << *ptra << endl;
return0;
}