write a program to swap Two numbers without using temp variable.
Answer Posted / ram thilak.p
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,*p1,*p2;
clrscr();
printf("\n\n\t Enter The Values Of A and B:");
scanf("%d %d",&a,&b);
*p1=a;
*p2=b;
b=*p1;
a=*p2;
printf("\n\n\t The Values Of Elements After Swapping Is:%d %d",a,b);
getch();
}
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Why clrscr is used in c?
How can I find the modification date of a file?
Why is sizeof () an operator and not a function?
Why shouldn’t I start variable names with underscores?
Place the #include statement must be written in the program?
writ a program to compare using strcmp VIVA and viva with its output.
On most computers additional memory that is accessed through an adapter of feature card along with a device driver program. a) user memory b) conventional memory c) expandedmemory d) area
List a few unconditional control statement in c.
Using which language Test cases are added in .ptu file of RTRT unit testing???
How do you override a defined macro?
What is static memory allocation?
How many levels of pointers have?
write a program to find the given number is prime or not
What is clrscr ()?
Explain why C language is procedural?