+ 6

Where we used as pointers?

Pointer is a variable but stores in address of another's variables. How to use this pointers in various programs.

30th Dec 2018, 12:51 PM
Dineshraj Dhanapathy(Lazy_Insane_coder)
6 Antworten
+ 3
Pointers Variables. C++ gives you the ability to manipulate the data in the computer's memory directly. Pointers are variables that point to another variable's specific address in the memory pointed by another variable. So lets say I make an integer called x which = 20. Then I type int * p = &x. The value of p will point into x's address. Thus allowing me to get the value stored within the address held by the pointer. So at we use pointers so that we can modify the variable and object called in a function. Hopelly I answered correctly, I learned a bit as well trying to answer.
31st Dec 2018, 2:32 AM
Pirate_Programmer
Pirate_Programmer - avatar
+ 2
We are only assume the variables of the pointers. How to allocate the address automatic. remain address to declare the variable *p. You are talking about passing the variables in various parameters in different locations is affect the original parameter.
30th Dec 2018, 1:23 PM
Dineshraj Dhanapathy(Lazy_Insane_coder)
+ 1
when you want to pass a parameter to a method and want the changes that take place in the method to affect the original parameter you can pass pointers to the parameter.
30th Dec 2018, 1:14 PM
Asirap
0
Pointer is used to store the memory address
27th Feb 2019, 5:59 AM
Rishabh Jain
- 1
dineshraj dhanapathy sorry I can't understand your question. Someone here can help you hopefully
30th Dec 2018, 5:01 PM
Asirap