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
What are the advantages of c preprocessor?
What is an auto keyword in c?
Explain is it valid to address one element beyond the end of an array?
what is the role you expect in software industry?
Hai what is the different types of versions and their differences
Can a pointer be volatile in c?
What are derived data types in c?
What is difference between union and structure in c?
Can we use any name in place of argv and argc as command line arguments?
Why is c faster?
Explain what is a static function?
What is a far pointer in c?
What is meant by high-order and low-order bytes?
what is reason of your company position's in india no. 1.
What are examples of structures?