write a program to swap Two numbers without using temp variable.
Answer Posted / dally
#include<stdio.h>
int main()
{
int a,b;
printf("Enter values for a,b\n");
scanf("%d %d",&a,&b);
b = b+a;
a= b-a;
b=b-a;
printf("a = %d,b = %d",a,b);
}
| Is This Answer Correct ? | 18 Yes | 11 No |
Post New Answer View All Answers
Which one to choose from 'initialization lists' or 'assignment', for the use in the constructor?
Find MAXIMUM of three distinct integers using a single C statement
What is #include stdio h?
What does stand for?
the maximum length of a character constant can be a) 1 character b) 8 characters c) 256 chaacters d) 125 characters
What is the function of this pointer?
What is difference between union All statement and Union?
What are categories used for in c?
write a progrmm in c language take user interface generate table using for loop?
how can i write a program that prints out a box such that whenever i press any key8(coordinate number) on the keyboard, the box moves.
The postoder traversal is 7,14,3,55,22,5,17 Then ur Inorder traversal is??? please help me on this
What are valid operations on pointers?
What is static memory allocation?
What is the difference between constant pointer and constant variable?
What is header file definition?