wat are the two methods for swapping two numbers without
using temp variable??
Answer Posted / saida
int a=4,b=6;
printf("Before swapping: a=%d, b=%d",a,b);
a=a^b;
b=a^b;
a=a^b;
printf("After swapping: a=%d, b=%d",a,b);
}
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What the different types of arrays in c?
What is the difference between text files and binary files?
Why use int main instead of void main?
What does #pragma once mean?
What is the difference between functions getch() and getche()?
What are the key features in c programming language?
What should malloc(0) do? Return a null pointer or a pointer to 0 bytes?
Explain how do you list a file’s date and time?
What is ctrl c called?
What will be your course of action for a push operation?
Can the “if” function be used in comparing strings?
Does free set pointer to null?
Calculate the weighted average of a list of n numbers using the formula xavg = f1x1+f2x2+ ….+ fnxn where the f’s are fractional weighting factors, i.e., 0<=fi<1, and f1+f2+….+fn = 1
What does == mean in texting?
What does != Mean in c?