write a program to swap Two numbers without using temp variable.
Answer Posted / ankit tiwari
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
printf("enter the two number");
scanf("%d%d",&a,&b);
a=b-a;
b=b-a;
a=b+a;
printf("ais=%d",a);
printf("b is=%d",b);
getch();
}
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
How can I find the modification date and time of a file?
Write a program that takes a 5 digit number and calculates 2 power that number and prints it(should not use big integers and exponential functions)
Write a program to print fibonacci series using recursion?
What is the difference between local variable and global variable in c?
What is the purpose of void in c?
What are the different types of pointers used in c language?
What is the use of typedef in c?
What are derived data types in c?
What is static memory allocation?
What is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?
c programs are converted into machine language with the help of a) an interpreter b) a compiler c) an operatinf system d) none of the above
The % symbol has a special use in a printf statement. How would you place this character as part of the output on the screen?
Is c language still used?
What is pointer to pointer in c language?
All technical questions