+ 4
Can someone explain pointers topic in c language? ??
5 Respuestas
+ 1
Pointer point where the variable stored in the memory
+ 4
Pointers are a way to point to a memory location and access it. If you want a more accurate response look at this link:
https://www.tutorialspoint.com/cprogramming/c_pointers.htm
+ 2
Each variable declared has its value and its address in the memory.pointer that point to that address is also a variable but it stores the address of a variable (reference).We can so then use this pointer to access and change the variable value.(derefernce).Functions that use a global variable can call those variable by values.So they create a copies for those variables.They can also access and modify variables using pointers.This mecanism is called call by reference in c programming .
+ 2
Let I have variable (num) and (int num = 7;)
So what you think where it is stored?? Definitely in your RAM and in ram definitely it has some address like your home address.
Normal variable stores the value whereas pointer variable stores the address of the variable.
So let (ptr) is pointer and (int *ptr = #)
And pointer (ptr) will store address of variable (num) like you can store your home address in notebook to access it later.
Now you can print address of variable (num) using pointer (ptr) like this::
printf("%p", ptr);
In sololearn this topic was greatly explained
+ 1
Sabse better option hai pointers,arrays ke question kyunki concept same rhta hai lekin diff-diff questions krke tumhe pointers ke baare me achchi knowledge ho jaye...
I'm also a begginer