write a program to swap Two numbers without using temp variable.
Answer Posted / guest
# include "stdio.h"
main()
{
int a,b;
printf("enter two numbers for swaping");
scanf("%d%d",&a,&b);
a=a+b;
b=a-b;
a=a-b;
printf("a is %d",a);
printf("b is %d",b);
} output:- takea,b value is 2,3 and give answers is3,2
Is This Answer Correct ? | 243 Yes | 58 No |
Post New Answer View All Answers
How can I read/write structures from/to data files?
How can I access an I o board directly?
What is variable declaration and definition in c?
What should malloc(0) do?
Is using exit() the same as using return?
main() { printf("hello"); fork(); }
What are high level languages like C and FORTRAN also known as?
What is conio h in c?
What is the difference between āgā and āgā in C?
Explain what is #line used for?
How can I write a function that takes a format string and a variable number of arguments?
What is c preprocessor mean?
how to find binary of number?
Who invented b language?
What is c language & why it is used?