swap two no without using third variable

Answer Posted / v.bharathi

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("\nenter a,b value");
scanf("%d%d",&a,&b);
a=a+b;
b=a-b;
a=a-b;
printf("\nafter swapping..\n%d%d",a,b);
getch();
}

Is This Answer Correct ?    10 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a script to delete all the files in a folder except one desired file.

936


create a .dll component operation and use created component in another project. required methods events and properties. connect, add,search,data report

2097


how exactly is the lngColour used?

1796