write a program to swap Two numbers without using temp variable.
Answer Posted / saurav raj
#include<stdio.h>
#include<conio.h>
void main()
int a,b;
clrscr();
printf("Enter Two number a & b:- ");
scanf("%d%d",&a,&b);
a=a+b;
b=a-b;
a=a-b;
printf("\nA=%d \t B=%d",a,b);
getch();
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
What is a floating point in c?
What is the use of f in c?
What are the 5 elements of structure?
can anyone please tell about the nested interrupts?
What are nested functions in c?
What is the difference between typedef and #define?
if a is an integer variable, a=5/2; will return a value a) 2.5 b) 3 c) 2 d) 0
A float occupies 4 bytes in memory. How many bits are used to store exponent part? since we can have up to 38 number for exponent so 2 ki power 6 6, 6 bits will be used. If 6 bits are used why do not we have up to 64 numbers in exponent?
What is a double c?
What is const volatile variable in c?
What is && in c programming?
What is string concatenation in c?
Why do we use return in c?
FORMATTED INPUT/OUTPUT functions are a) scanf() and printf() b) gets() and puts() c) getchar() and putchar() d) all the above