In the first case if iam using the individual variable like below
i have to use the * before the variables .
void getSumDifAndProduct(int a,int b,int *sum,int *dif,int *product);
void getSumDifAndProduct(int a,int b,int *sum,int *dif,int *product)
*sum = a+b;
*dif = (a-b);
*product = (a*b);
printf("Please Enter the a and b values \n");
printf("a and b is %d %d \n",a,b);
printf("a and b sum is %d \n",sum);
printf("a and b dif is %d \n",dif);
printf("a and b product is %d \n",product);
sum = a+b;
i get error like below
ex1.c:7: warning: assignment makes pointer from integer without a cast
I understand here as we need to put the value in the memory location of sum .
But the structure variable should also be the same case .
Why should we avoid giving the * here .