Write a program to interchange two variables without using
the third variable?
Answer Posted / mahendra giri
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("Enter two no");
scanf("%d%d",&a,&b);
c=a+b;
b=a-b;
a=a-b;
printf("After chanching no is =\n");
printf("a=%d b=%d",a,b);
getch();
}
| Is This Answer Correct ? | 23 Yes | 44 No |
Post New Answer View All Answers
Write the syntax and purpose of a switch statement in C.
pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)
What is time null in c?
Do you know the use of 'auto' keyword?
What is %lu in c?
Explain what is the difference between text files and binary files?
Which operators cannot be overloaded a) Sizeof b) .* c) :: d) all of the above
how many key words availabel in c a) 28 b) 31 c) 32
What is new line escape sequence?
Explain c preprocessor?
write a program fibonacci series and palindrome program in c
How to write a multi-statement macro?
How is a null pointer different from a dangling pointer?
What is chain pointer in c?
How can you restore a redirected standard stream?