write a program to swap Two numbers without using temp variable.
Answer Posted / prudhvi
int a, b, c;
a = int.Parse(Console.ReadLine());
b = int.Parse(Console.ReadLine());
c = b;
b = a;
a = c;
Console.WriteLine("a={0},b={1}",a,b);
Console.ReadLine();
}
Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
What is build process in c?
What is a program flowchart and how does it help in writing a program?
What does 2n 4c mean?
What are pointers?
Why functions are used in c?
What are the modifiers available in c programming language?
write a c program to find the sum of five entered numbers using an array named number
What is the use of function overloading in C?
Why is it important to memset a variable, immediately after allocating memory to it ?
Why do we need a structure?
Why is c faster?
What does *p++ do? What does it point to?
Find duplicates in a file containing 6 digit number (like uid) in O (n) time.
What is the meaning of 2d in c?
In this assignment you are asked to write a multithreaded program to find the duplicates in an array of 10 million integers. The integers are between -5000,000 to 5000,000 and are generated randomly. Use 10 threads, each thread works on 1000,000 integers. Compare the time needed to accomplish the task with single thread of execution program. Do not include the time to fill the array with integers in the execution time.