Quick question.

Mar 14, 2018 at 9:22am
Are these two pointers the same?
1
2
3
4
5
6
7
int value = 10;

int *ptr1;
int *ptr2;

ptr1 = &value;
*ptr2 = value;


Thanks!
Mar 14, 2018 at 9:27am
You can write a little program to verify if they are equal or not, a pointer is just a variable that holds an address, which is just a number. You just print them out, or use an if statement.

Topic archived. No new replies allowed.