Program 3

Write a C program to interchange two numbers. #include<stdio.h>void main(){int a,b;     a=10;     b=20; printf(“value of a before iuterchange =%d\n”,a);printf(“value of a before iuterchange =%d\n”,b); a+=b;b=a-b;a=a-b; printf(“value of a after iuterchange =%d\n”,a);printf(“value of a after iuterchange =%d\n”,b); return 0;} Output value of a before iuterchange =10value of a before iuterchange =20value of a after iuterchange =20valueContinue reading “Program 3”

Design a site like this with WordPress.com
Get started