write a program to swap Two numbers without using temp variable.
Answer Posted / gouttam pradhan
#include<stdio.h>
main()
{
int a,b;
printf("enter two numbers");
scanf("%d%d",&a&b);
a=a+b;
b=a-b;
a=a-b;
printf("swaped valuess= ",);
printf("a=%d",a);
printf("b=%d",b);
getch();
}
| Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
An instruction which is analysed and acted upon by the processor prior to the compiler going its work a) directive b) constructive c) constant d) absolute mode
Is flag a keyword in c?
What is printf () in c?
What is dynamic variable in c?
what is different between auto and local static? why should we use local static?
differentiate built-in functions and user – defined functions.
What is a pragma?
What is pivot in c?
Explain how do you declare an array that will hold more than 64kb of data?
What is cohesion and coupling in c?
How #define works?
What are predefined functions in c?
What is auto keyword in c?
Why c is called object oriented language?
How do you write a program which produces its own source code as output?