How can u swap 2 variables in C without using 3rd variable?
Answers were Sorted based on User's Feedback
Answer / sj
main()
{
int a=20,b=30;
clrscr();
a=a+b;
b=a-b;
a=a-b;
printf("%d%d",a,b);
getch();
}
| Is This Answer Correct ? | 38 Yes | 4 No |
Answer / deepa
main()
{
int a=20,b=30;
clrscr();
b=a+b;
a=b-a;
b=b-a;
printf("%d%d",a,b);
getch();
}
| Is This Answer Correct ? | 5 Yes | 4 No |
Answer / 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 |
can u merge 10GUI map files into a single GUI map file in winrunner?
What is meant by Decision Table Testing Technique?
what is use case
What are the activities involved by the Test engineer (having 2+ yrs of exp).
1 Answers Covansys, SLK Software,
Write 5 Test Cases for ATM From Security Point of View ?
what are the different statuses of test cases?
what is testing?
5 Answers Naukri.com, RealTech, TCS, Value Labs,
7. What types of Web accessibility information do you look for on the Internet?
what r the best jobsites for manual and automation testing? except testingken.com
when doing regression testing, how can we know that other screen or module are affected?
what is the difference between Load,Stress and Volume Testing?
Give me different methodologies used in testing?