write a program to swap Two numbers without using temp variable.
Answer Posted / rani
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
printf ("enter the values to a & b");
scanf("%d%d",&a,&b);
a=a+b;
b=a-b;
a=a-b;
printf("%d%d",a,b);
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is a char in c?
exit () is used to a) exit () terminates the execution of the program itself b) exit () terminates the execution of the loop c) exit () terminates the execution of the block d) none of the above
What are structure types in C?
What is bin sh c?
How can you avoid including a header more than once?
What are the advantages and disadvantages of c language?
Is there any algorithm to search a string in link list in the minimum time?(please do not suggest the usual method of traversing the link list)
How do you define structure?
What is an array in c?
Explain how do you list files in a directory?
What is equivalent to ++i+++j?
Write a program to generate random numbers in c?
What are the types of data types and explain?
Compare and contrast compilers from interpreters.
Is return a keyword in c?