Write a program to interchange two variables without using
the third variable?

Answer Posted / debasis nayak

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("Enter the value of A and B");
scanf("%d %d",&a,&b);
b=(a+b-a=b);
printf("After interchange value are %d %d",a,b);
getch();
}

Is This Answer Correct ?    11 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

c language supports bitwise operations, why a) 'c' language is system oriented b) 'c' language is problem oriented c) 'c' language is middle level language d) all the above

608


What is difference between %d and %i in c?

689


What do you mean by invalid pointer arithmetic?

637


Write a program to reverse a given number in c language?

616


Why string is used in c?

579






Explain c preprocessor?

678


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

715


What is structure in c explain with example?

630


What is mean by data types in c?

547


What is 02d in c?

633


What is void c?

560


What are different types of operators?

592


Which are low level languages?

629


Explain what are linked list?

617


What are the characteristics of arrays in c?

609