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 you pass an array to a function by value?
What is %d called in c?
in programming languages a statement or part of a statement that specifies several different execution sequences a) constructs b) distructs c) executes d) none
Write a program to show the change in position of a cursor using c
How does #define work?
What is the difference between void main and main in c?
Can you write the function prototype, definition and mention the other requirements.
What is the use of #define preprocessor in c?
What does the error message "DGROUP exceeds 64K" mean?
Read the following data in two different files File A: aaaaaaaadddddddd bbbbbbbbeeeeeeee ccccccccffffffff File B: 11111111 22222222 33333333 By using the above files print the following output or write it in the Other file as follows aaaaaaaa11111111dddddddd bbbbbbbb22222222eeeeeeee cccccccc33333333ffffffffffff
What standard functions are available to manipulate strings?
How do I create a directory? How do I remove a directory (and its contents)?
What is use of #include in c?
why to assign a pointer to null sometimes??how can a pointer we declare get assigned with a garbage value by default???
How many loops are there in c?