pretty basic, first pointer program i have written. format is for a*b=c.
a has pointer *x, b has pointer *p, and **y, and c has pointer *q, **r, ***z. using *x, **y, and ***z to print results. it gives me error on line 23. i have tried quite a few different ways of writing the multiplication but i cant figure out how i am supposed to write it. i want x times y to equal z. and then print all 3.
Code:#include <stdio.h> #include <stdlib.h> int main() { int a; int b; int c; int* x; int* p; int* q; int** y; int** r; int*** z; x=&a; y=p=&b; z=r=q=&c; printf("Enter 2 multiplicands:\n"); scanf("%d %d", &x, &y); z = (x) * (y); printf("multiplicands and result are: %d %d %d", x, y, z); return 0; }