Question: Example 1 : Pointers #include using namespace std; int main ( ) { int * pc , c; c = 5 ; cout < <
Example : Pointers
#include
using namespace std;
int main
int pc c;
c ;
cout "Address of c &c: &c endl;
cout "Value of c c: c endl endl;
pc &c; Pointer pc holds the memory address of variable c
cout "Address that pointer pc holds pc: pc endl;
cout "Content of the address pointer pc holds pc: pc endl endl;
c ; The content inside memory address &c is changed from to
cout "Address pointer pc holds pc: pc endl;
cout "Content of the address pointer pc holds pc: pc endl endl;
pc ;
cout "Address of c &c: &c endl;
cout "Value of c c: c endl endl;
return ;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
