write a program to swap Two numbers without using temp variable.
Answer Posted / abhi
void swap(int *a,int *b)
{
if(*a == *b)
return;
*a^=*b;
*b^=*a;
*a^=*b;
}
| Is This Answer Correct ? | 461 Yes | 195 No |
Post New Answer View All Answers
What are local static variables? How can you use them?
Can static variables be declared in a header file?
What are different types of variables in c?
Explain why can’t constant values be used to define an array’s initial size?
What does 3 mean in texting?
Why do we need volatile in c?
What are the advantages of using new operator as compared to the function malloc ()?
how to count no of words,characters,lines in a paragraph.
write a c program for swapping two strings using pointer
Can you apply link and association interchangeably?
What is main () in c?
What is file in c preprocessor?
Why C language is a procedural language?
Why is event driven programming or procedural programming, better within specific scenario?
What is the explanation for modular programming?