How do we swap or interchange any 2 numbers without using
Temporary variable...Anybody can pls answer it.. Thanks in
Advance

Answer Posted / girish

#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
void main()
{
int a,b;
clrscr();
printf("Enter the two values:");
scanf("%d%d",&a,&b);
swap(a,b);
pritnf("the swaping of given two values are:\na=%d,b=%
d",a,b);
getch();
}

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is clrscr ()?

644


Can you write the algorithm for Queue?

1558


Why c is called object oriented language?

592


Write program to remove duplicate in an array?

604


Why is C language being considered a middle level language?

660






a sequence of bytes with one to one corrspondence to those in the external device a) sequential addressing b) address c) byte code d) none

729


What is function definition in c?

595


Where local variables are stored in c?

562


what is the different bitween abap and abap-hr?

1747


Why can't I perform arithmetic on a void* pointer?

641


write a program which the o/p should b in such a way that s triangle if I/p is 3,a Square/rectangle if I/P=4,a pentagon if I/P=5 and so on...forget about the I/P which is less than 3

1647


What does sizeof return c?

612


How important is structure in life?

597


What oops means?

588


What is bash c?

564