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
How will you divide two numbers in a MACRO?
Is it acceptable to declare/define a variable in a c header?
How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?
in case any function return float value we must declare a) the function must be declared as 'float' in main() as well b) the function automatically returned float values c) function before declared 'float' keyword d) all the above
What is getch () for?
Can we use any name in place of argv and argc as command line arguments?
What is wrong with this statement? Myname = 'robin';
What is a lookup table in c?
if (i = 0)printf ("True"); elseprintf("False"); Under what conditions will the above print out the string "True" a) Never b) Always c) When the value of i is 0 d) all of the above
What are the types of data structures in c?
what is the syallabus of computer science students in group- 1?
What does p mean in physics?
What is wrong in this statement? scanf(ā%dā,whatnumber);
What is the use of pragma in embedded c?
What is the difference between a free-standing and a hosted environment?