Preview:
 void addsub(int *x,int *z) {
     int temp;
     temp=*x+*z;
     *x=temp;
     *z=*x-*z;
 } 
 
 int main() { 
     int a,b; 
     printf("enter the value of a: ");
     scanf("%d",&a);
     printf("enter the value of b: ");
     scanf("%d",&b);
     addsub(&a,&b);
     printf("a=%d\n",a); 
     printf("b=%d",b);
     }
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter