0
Pointer Details
What is Pointer ? I want learn the clear concept.
2 ответов
+ 1
A pointer is a variable that points to a memory location. You can create a pointers like this:
int x = 5;
int* y = &x;
& is used to access the variable's memory location, and the int* means that y will point to an integer.
y will track x, no matter what.
Printing y will mostly give you a "nonsensical" number, since it is the memory location, and you can't do anything with it. To actually show the value, you have to again use the asterisk:
printf("%d", *y); //This will output 5
0
Thank a lot Airree