write a program to swap Two numbers without using temp variable.
Answer Posted / tchoephel
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
printf("enter two nos A and B\n");
scanf("%d%d",a,b);
printf("before swaping A=%d\n B=%d\n",a,b);
a=a+b:
b=a-b;
a=a-b;
prinf("after swaping A=%d\n B=%d\n",a,b);
getch();
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is static identifier?
Why is c called "mother" language?
What do you mean by command line argument?
What is a MAC Address?
On most computers additional memory that is accessed through an adapter of feature card along with a device driver program. a) user memory b) conventional memory c) expandedmemory d) area
Explain the use of keyword 'register' with respect to variables.
How can I read and write comma-delimited text?
How arrays can be passed to a user defined function
What are the different data types in C?
Is anything faster than c?
Explain what’s a signal? Explain what do I use signals for?
List some of the static data structures in C?
How can you call a function, given its name as a string?
How are structure passing and returning implemented?
What is assert and when would I use it?