write a program to swap Two numbers without using temp variable.
Answer Posted / biren
#include<stdio.h>
void main()
{
int a=2,b=3;
printf("before swap the value is:::");
printf("a=%d\tb=%d",a,b);
b=a+b-(a=b);
printf("after swap the value is:::");
printf("a=%d\tb=%d",a,b);
}
| Is This Answer Correct ? | 3 Yes | 4 No |
Post New Answer View All Answers
Write a code to remove duplicates in a string.
What does emoji p mean?
With the help of using classes, write a program to add two numbers.
How to find a missed value, if you want to store 100 values in a 99 sized array?
Explain the properties of union.
Is null always defined as 0(zero)?
What is the difference between abs() and fabs() functions?
What are variables and it what way is it different from constants?
while initialization of array why we use a[][2] why not a[2][]...?
Is fortran still used in 2018?
Tell me with an example the self-referential structure?
What is %g in c?
What is the value of h?
Why is a semicolon (;) put at the end of every program statement?
Write a program to check whether a number is prime or not using c?