I know I asked these question before but I did not get the right answer they said me to go through google but I found nowhere and I really wanna know I cant leave it on.The concept of pointers
How the GREAT Dennis Ritchie wrote the code for & and * operators? How do they work?
Because I want to know the code I want make my own pointers, not just saying int *p; I want to know the working how it is going retrieve the data from an address.
Can we write the code in C? Is that possible without declaring a variable as a pointer?
With a normal variable int p;, can we store the address of other variable and retrieve its data?
Please don’t say to use:
int main()
{
int p,a;
p=(void *)&a; // dont say these syntax to store the adress
*(void *)p=45; // and these syntax to restore the data
}
I know that code, but is there any other way to make it through? I have been thinking about it from months. Actually I work on micro controllers, they even use the # symbol as a pointer how does that work? There must be some code behind it.
below
*pis an operation called load indirect, and below*p=vis an operation called store indirect.&ais just syntax for the location ofa. both of those operations are built in to the machine code of all modern computers.