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
What is typedef?
Device an algorithm for weiler-atherton polygon clipping, where the clipping window can be any specified polygon
What is a union?
Explain what does it mean when a pointer is used in an if statement?
What is the difference between specifying a constant variable like with constant keyword and #define it? i.e what is the difference between CONSTANT FLOAT A=1.25 and #define A 1.25
int far *near * p; means
what will be the output for the following main() { printf("hi" "hello"); }
What the different types of arrays in c?
Write a program to check palindrome number in c programming?
Differentiate between a for loop and a while loop? What are it uses?
Can you define which header file to include at compile time?
What is the purpose of ftell?
How do we print only part of a string in c?
Explain how can I write functions that take a variable number of arguments?
What is difference between %d and %i in c?