write a program to swap Two numbers without using temp variable.
Answer Posted / gouttam pradhan
#include<stdio.h>
main()
{
int a,b;
printf("enter two numbers");
scanf("%d%d",&a&b);
a=a+b;
b=a-b;
a=a-b;
printf("swaped valuess= ",);
printf("a=%d",a);
printf("b=%d",b);
getch();
}
Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
Define Array of pointers.
Why does the call char scanf work?
What is the purpose of 'register' keyword in c language?
Write a program to print fibonacci series using recursion?
Is c programming hard?
What does printf does?
Can you return null in c?
What is #ifdef ? What is its application?
Write a C program to accept a matrix of any size. Find the frequency count of each element in the matrix and positions in which they appear in the matrix
Where are some collections of useful code fragments and examples?
What are the advantages of c language?
C program execution always begins with a) #include b) comment (/*-------*/) c) main() d) declaration instructions
Write a code to generate a series where the next element is the sum of last k terms.
What is the difference between %d and %i?
What are reserved words with a programming language?