0
Help me with c arrays and pointers
My below code doesn't work. Anyone explain me, 1) The reason for it's failure 2) How to fix this https://code.sololearn.com/cO5ghlBOc3A4/?ref=app
4 Respostas
+ 3
pointers should equal memory addresses
https://code.sololearn.com/cForI9XPEtDI/?ref=app
+ 2
Rishi see here
int number =1; //normal integer variable
int *ptr ; //ptr is pointer variable
ptr=&number; //ptr store's the address of variable number
// pointer points to an address of a variable
*ptr=*&number;
//by dereferencing ptr gives the value stored at address which was pointing
//so *ptr =1 ;
+ 2
Thirt13n yeah thanks
0
Thirt13n yeah I know that but I'm trying to learn how Actually memory allocation works in C.