Write a program to interchange two variables without using
the third variable?
Answer Posted / vinay tiwari
void main()
{
int a,b;
printf("enter two no ");
scanf("%d%d",&a,&b);
printf("a=%d and b=%d",a,b);
a=a^b;
b=a^b;
a=a^b;
printf("a=%d and b=%d",a,b);
getch();
}
| Is This Answer Correct ? | 22 Yes | 13 No |
Post New Answer View All Answers
What is Dynamic memory allocation in C? Name the dynamic allocation functions.
What happens if a header file is included twice?
Why doesnt the call scanf work?
explain what are actual arguments?
What is the difference between break and continue?
What is a void pointer in c?
Hai what is the different types of versions and their differences
Explain union. What are its advantages?
How many levels of pointers can you have?
How is a macro different from a function?
write a programe to accept any two number and check the following condition using goto state ment.if a>b,print a & find whether it is even or odd and then print.and a
How can I invoke another program (a standalone executable, or an operating system command) from within a c program?
Hello. How to write a C program to check and display president party like if i type in the console "biden" and hit enter the output shoud be : "biden is democrat" and if i type "trump" and hit enter the output shoud be: "trump is republican"
in ‘C’ language for Matrix Multiplication fails” Introspect the causes for its failure and write down the possible reasons for its failure.
Badboy is defined who has ALL the following properties: Does not have a girlfriend and is not married. He is not more than 23 years old. The middle name should be "Singh" The last name should have more than 4 characters. The character 'a' should appear in the last name at least two times. The name of one of his brothers should be "Ram" Write a method: boolean isBadBoy(boolean hasGirlFriend , boolean isMarried, int age , String middleName , String lastName , String[] brotherName); isHaveGirlFriend is true if the person has a girlfriend isMarried is true if the person is married age is the age of the person middleName is the middle name of the person lastName is the last name of the person brotherName is the array of the names of his brothers