Quick question.

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!
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.