write a program to swap Two numbers without using temp variable.
Answer Posted / ragini
#include<stdio.h>
#include<conio.h>
void swap(int a,int b);
void main()
{
int a,b;
swap(a,b);
printf("Enter the 2 nos");
scanf("%d%d",&a,&b);
}
void swap(int x,int y)
{
x=x*y;
y=x/y;
x=x/y;
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is variable declaration and definition in c?
What does return 1 means in c?
What are the three constants used in c?
What are the types of c language?
Is c dynamically typed?
Explain what are binary trees?
What is the scope of local variable in c?
How can I find out how much free space is available on disk?
How can I remove the leading spaces from a string?
Explain is it better to bitshift a value than to multiply by 2?
What is void main ()?
Explain how do you list files in a directory?
What is the main difference between calloc () and malloc ()?
What does static variable mean in c?
Explain what does the function toupper() do?