write a program to swap Two numbers without using temp variable.
Answer Posted / akash
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("enter the value a & b");
scanf("%d%d",&a,&b);
a=a+b;
b=a-b;
a=a-b;
printf("interchange in a & b =%d%d",a,b);
getch();
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What are the advantages of using Unions?
how to create duplicate link list using C???
Explain #pragma statements.
How will you divide two numbers in a MACRO?
An application package has been provided to you without any documents for the following application. The application needs to be tested. How will you proceed?
Find duplicates in a file containing 6 digit number (like uid) in O (n) time.
What is the difference between break and continue?
How many main () function we can have in a project?
What is the equivalent code of the following statement in WHILE LOOP format?
#define PRINT(int) printf("int = %d ",int) main() {< BR> intx,y,z; x=03;y=02;z=01; PRINT(x^x); z<<=3;PRINT(x); y>>=3;PRINT(y); }
What is a memory leak? How to avoid it?
How would you obtain the current time and difference between two times?
.main() { char *p = "hello world!"; p[0] = 'H'; printf("%s",p); }
what is the difference between north western polytechnique university and your applied colleges?? please give ur answers for this. :)
What are variables c?