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
Explain how are portions of a program disabled in demo versions?
What is pre-emptive data structure and explain it with example?
What is c language & why it is used?
count = 0; for (i = 1;i < = 10; i++);count = count + i; Value of count after execution of the above statements will be a) 0 b) 11 c) 55 d) array
Do array subscripts always start with zero?
What is the difference between test design and test case design?
What is 2 d array in c?
program to find error in linklist.(i.e find whether any node point wrongly to previous nodes instead of next node)
What is local and global variable in c?
Where local variables are stored in c?
Explain about the constants which help in debugging?
What is #error and use of it?
Explain how to reverse singly link list.
What is selection sort in c?
Hai what is the different types of versions and their differences