How can u swap 2 variables in C without using 3rd variable?

Answer Posted / rahul

#include<stdio.h>
#include<conio.h>
void main()
{
int a=20,b=30,c;
clrscr();
a=a+b;
b=b+a;
c=a+b;
c=b-a;
printf("swapping two variables using 3rd variable");
scanf("%d%d%d,a,b,c);
getch();
}

Is This Answer Correct ?    2 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

State a generalized process for load test? Or explain how you did it previously.

2089


pl. give me the list of top jobs website to register i have 2Yrs. Experience in manual testing

1660


how to connect your project in database?

1527


hai friends i need a general test cases for check box,drop down button and radio butoon can anybody reply me plz..........thanks in advance

1567


What is the limit for test steps?It should be 10/20/30etc

1501






I have to give weights to 5 stones so that using a simple balance and the stone i should be able to weight any number between 1-100

1884


What is Web testing & which action we take at the time of Web Testing?

1476


3. In a system designed to work out the tax to be paid: An employee has £4000 of salary tax free. The next £1500 is taxed at 10%. The next £28000 after that is taxed at 22%. Any further amount is taxed at 40%. To the nearest whole pound, which of these groups of numbers fall into three DIFFERENT equivalence classes?

1703


In Quality Center, If we can reuse a non reusable test script as template test, then what is the need of defining reusable test scripts? What additional functionality does Reusable test scripts add when compared to non reusable test scripts?

2564


There is only requirements document. You have 10 days and 8 resources to release the system.At the end of the 8th day u tell ur TL that system is ready for release. How will you proceed with the testing process or in other words what all approach you will follow once you get requirements

1583


Can you explain v model in manual testing?

698


Define cause effect graphing?

695


Hi could some one please send me the testplan testcases(for 2Modules) and testscripts for mercry fliht aplication or gmail. please write those on templates and send me.In testplan plase write Testobjective, test scope, est approach, exlusions assumptios.

1574


Describe your experiences with code analyzers.

1739


What is black box testing, and what are the various techniques?

732