write a program to swap Two numbers without using temp variable.
Answer Posted / biren
#include<stdio.h>
void main()
{
int a=2,b=3;
printf("before swap the value is:::");
printf("a=%d\tb=%d",a,b);
b=a+b-(a=b);
printf("after swap the value is:::");
printf("a=%d\tb=%d",a,b);
}
| Is This Answer Correct ? | 3 Yes | 4 No |
Post New Answer View All Answers
Explain how do you sort filenames in a directory?
How to delete a node from linked list w/o using collectons?
How can I find the modification date and time of a file?
How can I do peek and poke in c?
a direct address that identifies a location by means of its displacement from a base address or segment a) absolute address b) relative address c) relative mode d) absolute mode
Explain which of the following operators is incorrect and why? ( >=, <=, <>, ==)
write a program to display all prime numbers
Write a program to generate a pulse width frequency of your choise,which can be variable by using the digital port of your processor
What is the use of typedef in structure in c?
What are variables c?
What is the use of gets and puts?
Explain the properties of union. What is the size of a union variable
How can I sort more data than will fit in memory?
Why can’t constant values be used to define an array’s initial size?
What are the different categories of functions in c?