## Help with simple pointer program

 Quote by Mark44 No, **y is not the right expression in scanf, as you know. As you also know, the value in p is the address you need. What other expression that involves y also contains this address? It's not a very complicated expression.
Is it &*y?

I did a printf("%d", &b)
And a printf("%d", &*y)
And I got back the same answer.
 Mentor You don't need the & operator - *y already is an address.
 I think I got it. Does this look right? Code: #include #include int main() { int c; int b; int a; int* x = &a; int* p = &b; int** y = p; int* q = &c; int** r = &q; int*** z = &r; printf("Enter a value for A: "); scanf("%d", x); printf("Enter a value for B: "); scanf("%d", *y); *z = *x * **y; printf("A * B = %d\n", *z); printf("C = %d\nA = %d\nB = %d", *z, *x, **y); return 0; }
 Mentor The problem requirements are satisfied now. Does it give the right results?