write a program to swap Two numbers without using temp variable.
Answer Posted / amar
void main()
{
int a,b;
printf("enter the two numbers");
scanf("%d%d",&a,&b);
a^=b^=a^=b;
printf("%d%d",a,b);//swapped no
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is a scope resolution operator in c?
What is 2c dna?
What is output redirection?
what is recursion in C
How is a structure member accessed?
Can we add pointers together?
What is the general form of a C program?
Why doesnt the call scanf work?
What is a null string in c?
How can I ensure that integer arithmetic doesnt overflow?
What is the difference between array_name and &array_name?
Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?
What is the use of a conditional inclusion statement in C?
What do you mean by dynamic memory allocation in c? What functions are used?
What functions are used for dynamic memory allocation in c language?