Can someone explain pointers topic in c language? ?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

Can someone explain pointers topic in c language? ??

30th Aug 2020, 3:06 PM
In The Hunger Of Success
In The Hunger Of Success - avatar
5 Answers
+ 1
Pointer point where the variable stored in the memory
31st Aug 2020, 10:28 AM
mohamed abdalhaleem
mohamed abdalhaleem - avatar
+ 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
30th Aug 2020, 3:27 PM
Gabriele
Gabriele - avatar
+ 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 .
30th Aug 2020, 6:18 PM
HBhZ_C
HBhZ_C - avatar
+ 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
30th Aug 2020, 6:55 PM
🌀 Shail Murtaza شعیل مرتضیٰ
🌀 Shail Murtaza شعیل مرتضیٰ - avatar
+ 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
31st Aug 2020, 4:56 AM
Ravi Raj Rajput
Ravi Raj Rajput - avatar