Write a program to interchange two variables without using
the third variable?
Answer Posted / satish
#include<stdio.h>
void main()
{
int x,y;
printf("enter x and y: ");
scanf("%d%d",&x,&y);
x^=y^=x^=y;
printf("elements after swapping: %d,%d\n",x,y);
}
Is This Answer Correct ? | 20 Yes | 26 No |
Post New Answer View All Answers
What is main return c?
Is c dynamically typed?
What are reserved words?
Give basis knowledge of web designing ...
What is define directive?
"C" language developed by "Dennis Ritchie" at AT & T. his remarks are a) too general, too abstract b) could deal with only specific problems c) lost generality of BCPL and B restored d) no remarks
What do you mean by recursion in c?
How can I list all of the predefined identifiers?
How would you rename a function in C?
Is null always defined as 0(zero)?
Do string constants represent numerical values?
Does c have an equivalent to pascals with statement?
Function which gives a pointer to a binary trees const an integer value at each code, return function of all the nodes in binary tree.?
Explain what is the benefit of using an enum rather than a #define constant?
What are the different categories of functions in c?