write a program to swap Two numbers without using temp variable.
Answer Posted / kabita shah
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int x,y;
printf("enter two value");
scanf("%d%d",&x,&y);
x=x+y;
y=x-y;
x=x-y;
printf("value of x=%d",x);
printf("value of y=%d",y);
getch();
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
An integer that indentifies the position of a data item in a sequence of data items a) value b) number c) index d) all of the above
How do you determine whether to use a stream function or a low-level function?
How many types of operator or there in c?
Is main is a keyword in c?
What are the different types of control structures in programming?
Write a factorial program using C.
Can i use “int” data type to store the value 32768? Why?
What is boolean in c?
Explain the array representation of a binary tree in C.
Can I initialize unions?
How can you determine the size of an allocated portion of memory?
Explain how can I open a file so that other programs can update it at the same time?
what are bit fields? What is the use of bit fields in a structure declaration?
Can we use any name in place of argv and argc as command line arguments?
write a c program to print the next of a particular no without using the arithmetic operator or looping statements?