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
When would you use a pointer to a function?
What is storage class?
Explain what is page thrashing?
How can I call fortran?
WRITE A CODE IN C TO SEARCH A FILE FROM NOTEPAD FILE.
Is register a keyword in c?
Compare interpreters and compilers.
What math functions are available for integers? For floating point?
What is malloc calloc and realloc in c?
Explain the difference between call by value and call by reference in c language?
What is c value paradox explain?
What is the difference between the local variable and global variable in c?
How would you rename a function in C?
What are the different types of constants?
How do we make a global variable accessible across files? Explain the extern keyword?