/* write a program to accept value of a and b interchange the value of a and b i.e swapping*/
#include<stdio.h>
#include< conio.h>
main()
{
int a,b,c;
clrscr();
printf("\n Enter a value of a and b:-- ");
scanf("%d%d",&a,&b);
c=a;
a=b;
b=c;
printf(" \n The value of a is =%d",a);
printf(" \n The value of b is=%d",b);
getch();
}
/* Output
Enter a value of a and b:--34
45
The value of a is = 45
The value of b is =34
*/
Flowchart of this program
💬😊😀
No comments:
Post a Comment
This Blog helps you to learn basics to high level programming coding and practicals.
conceptual understanding