write a program to swap Two numbers without using temp variable.
Answer Posted / manas ranjan(gift)
#include<stdio.h>
void main()
{
int a,b;
printf("enter the numbers");
scanf("%d%d",&a,&b);
printf("before swaping the values are");
printf("a=%d,b=%d",a,b);
void swap(int,int);
swap(a,b);
}
void swap(int a,int b)
{
a=a+b;
b=a-b;
a=a-b;
printf("a=%d,b=%d",a,b);
}
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
What do mean by network ?
What is atoi and atof in c?
What is the difference between class and object in c?
Explain enumerated types.
Is c a great language, or what?
What is the difference between fread and fwrite function?
What is the difference between malloc() and calloc()?
Why doesnt the call scanf work?
Which driver is a pure java driver
Tell us something about keyword 'auto'.
What is the use of clrscr?
What does %d do?
Explain Basic concepts of C language?
Should I use symbolic names like true and false for boolean constants, or plain 1 and 0?
A collection of functions,calls,subroutines or other data a) library b) header files c) set of files d) textfiles