write a program to swap Two numbers without using temp variable.
Answer Posted / ashish kumar sharma
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("enter the Value of a:\n");
scanf("%d",&a);
printf("enter the Value of b:\n");
scanf("%d",&b);
a=a+b;
b=a-b;
a=a-b;
printf("Display The Swapping:\n");
printf("a=%d And b=%d",a,b);
getch();
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Explain about the functions strcat() and strcmp()?
What is void c?
What are the advantages of using macro in c language?
What is dynamic memory allocation?
Write a program to print fibonacci series using recursion?
Apart from dennis ritchie who the other person who contributed in design of c language.
Explain main function in c?
Explain why can’t constant values be used to define an array’s initial size?
What is sizeof array in c?
What is the difference between int main and void main in c?
Explain what is the benefit of using #define to declare a constant?
what is recursion in C
find out largest elemant of diagonalmatrix
What is a structure and why it is used?
Write an algorithm for implementing insertion and deletion operations in a singly linked list using arrays ?