Assume that ip1, ip2, and ip3 have already been declared to be of type "pointer to int". Assume further that each of these pointer variables have been initialized -- each points to some int variable. Write a statement that computes the sum of the variables that ip1 and ip2 point to, and assigns that value (the sum) to the variable that ip3 points to.

Respuesta :

Answer:

void main(){

int *ip1,*ip2,*ip3;

printf("Enter values for ip1 and ip2\n");

scanf("%d\n",ip1);

scanf("%d\n",ip2);

*ip3=*ip1+*ip2;

}

Explanation:

*ip3=*ip1+*ip2;

this statement is used to add the values of two pointer variables and storing it in third pointer variable.

*ip1 --->ip1 gives address location of the variable and *ip1 gives the value stored at that address location