how to swap two integers 1 and 32767 without using third
variable
Answer Posted / g.sai lakshmi priyanka
void main()
{
int a,b;
a=32767,b=1;
a=a*b;
b=a/b;
a=a/b;
printf("%d %d",a,b);
}
EXPLAINATION:
a=32767*1=32767
b=32767/1=32767
a=32767/32767=1
a=1,b=32767
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
regarding pointers concept
Is struct oop?
What is the scope of an external variable in c?
Do you know the use of fflush() function?
Can we use visual studio for c?
.main() { char *p = "hello world!"; p[0] = 'H'; printf("%s",p); }
What is the use of printf() and scanf() functions?
Write a c program to demonstrate character and string constants?
can we change the default calling convention in c if yes than how.........?
What is hash table in c?
how to build a exercise findig min number of e heap with list imlemented?
a c code by using memory allocation for add ,multiply of sprase matrixes
How do you sort filenames in a directory?
#include
Which is the memory area not included in C program? give the reason