write a program to swap Two numbers without using temp variable.
Answer Posted / guest
# include "stdio.h"
main()
{
int a,b;
printf("enter two numbers for swaping");
scanf("%d%d",&a,&b);
a=a+b;
b=a-b;
a=a-b;
printf("a is %d",a);
printf("b is %d",b);
} output:- takea,b value is 2,3 and give answers is3,2
Is This Answer Correct ? | 243 Yes | 58 No |
Post New Answer View All Answers
What are called c variables?
What is operator precedence?
What do the functions atoi(), itoa() and gcvt() do?
What is formal argument?
what is use of malloc and calloc?
What is a pointer variable in c language?
given post order,in order construct the corresponding binary tree
How can I implement sets or arrays of bits?
Is c is a low level language?
Explain b+ tree?
what are enumerations in C
How do you construct an increment statement or decrement statement in C?
Explain the difference between call by value and call by reference in c language?
Write a code to remove duplicates in a string.
In c programming language, how many parameters can be passed to a function ?