Answer Posted / yadhunandan.t
wap to swap two numbers without using third variable.
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("enter the value of a & b");
scanf("%d %d",&a,&b);
printf("\n\n\n before swaping");
printf("\n\ta:%d",a);
printf("\n\tb:%d",b);
a=a+b;
b=a-b;
a=a-b;
printf("\n\n\n after swaping");
printf("\n\ta:%d",a);
printf("\n\tb:%d",b);
getch();
}
Is This Answer Correct ? | 5 Yes | 3 No |
Post New Answer View All Answers
What is a uint8?
What is the locale class?
How can c# app request minimum permissions? : java security
What are tags in java?
What is dependency injection in java?
For each of the following program segments,give a big zero
analysis for the running time
1.For (i=0;i What is meant by code profiling? What are the disadvantages of java sockets? I have deployed a .war file in my application server
comprising of struts and hibernate.If i want to change the
"dialect" property of hibernate cfg file how can i change(I
have only .war file)... Thanks in advance What is static class in java? What is the difference between Logical Parallelism and
Physical Parallelism? What is meant by annotations in java? What is javacpl? What is a java singleton? What happens when you omit a brace or misspell one of the words, like public or