How do we swap or interchange any 2 numbers without using
Temporary variable...Anybody can pls answer it.. Thanks in
Advance
Answer Posted / girish
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
void main()
{
int a,b;
clrscr();
printf("Enter the two values:");
scanf("%d%d",&a,&b);
swap(a,b);
pritnf("the swaping of given two values are:\na=%d,b=%
d",a,b);
getch();
}
| Is This Answer Correct ? | 0 Yes | 3 No |
Post New Answer View All Answers
What is floating point constants?
How do you construct an increment statement or decrement statement in C?
How can you invoke another program from within a C program?
What is gets() function?
Explain what are the different data types in c?
why do some people write if(0 == x) instead of if(x == 0)?
What is the difference between union and anonymous union?
Explain built-in function?
Is c programming hard?
hi folks i m approching for h1 b interview on monday 8th of august at montreal and i m having little problem in my approval notice abt my bithdate my employer has made a mistake while applying it is 12th january and istead of that he had done 18 the of january do any body have any solution for that if yes how can i prove my visa officer abt my real birthdate it urgent please let me know guys thaks dipesh patel
How can I swap two values without using a temporary?
How main function is called in c?
Why calloc is better than malloc?
What is calloc malloc realloc in c?
What is a stream?