wat are the two methods for swapping two numbers without
using temp variable??
Answers were Sorted based on User's Feedback
Answer / vijayakumar kanagasabai
main()
{
int a=4;b=6;
printf("Before swapping: a=%d, b=%d",a,b);
a=a+b;
b=a-b;
a=a-b;
printf("After swapping: a=%d, b=%d",a,b);
}
| Is This Answer Correct ? | 11 Yes | 1 No |
Answer / saida
int a=4,b=6;
printf("Before swapping: a=%d, b=%d",a,b);
a=a^b;
b=a^b;
a=a^b;
printf("After swapping: a=%d, b=%d",a,b);
}
| Is This Answer Correct ? | 2 Yes | 0 No |
What should malloc() do?
How to add two numbers without using arithmetic operators?
18 Answers College School Exams Tests, e track, Infosys, Pan Parag, Sapient, TCS,
a character or group of characters that defines a register,or a part of storage a) memory b) byte c) address d) linear list
What is c language and why we use it?
Are comments included during the compilation stage and placed in the EXE file as well?
What are structural members?
Wt are the Buses in C Language
Explain what’s a signal? Explain what do I use signals for?
Write a progarm to find the length of string using switch case?
What is the description for syntax errors?
Why header files are used?
program to print circle structure