write a program to swap Two numbers without using temp variable.
Answer Posted / saurav raj
#include<stdio.h>
#include<conio.h>
void main()
int a,b;
clrscr();
printf("Enter Two number a & b:- ");
scanf("%d%d",&a,&b);
a=a+b;
b=a-b;
a=a-b;
printf("\nA=%d \t B=%d",a,b);
getch();
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain how many levels deep can include files be nested?
Explain what does a function declared as pascal do differently?
how do you write a function that takes a variable number of arguments? What is the prototype of printf () function?
Write a C program in Fibonacci series.
What are conditional operators in C?
how do you execute a c program in unix.
What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file
What is string function in c?
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?
In a header file whether functions are declared or defined?
what is the difference between class and unio?
Can you please explain the difference between strcpy() and memcpy() function?
How many keywords are there in c?
What does != Mean in c?
What standard functions are available to manipulate strings?