0
how pointers work?
4 Antworten
+ 2
int x=20;
int *p;
p=&x;
cout<<x; //output - 20
cout<<p; //output - address of x
cout<<*p; //output - value of x(20)
+ 1
a pointer stores the address to a variable instead of storing the actual value
0
pointers are also faster?
modifying the actual variable in memory Instead of loading the variable then modify the variable then store the variable back to memory.
0
is *p a pointer or p with star (ignoring *)