void swap(int a,int b)
{
a=a+b;
b=a-b;
a=a-b;
}
in this code always gives the same result for all case
Answer Posted / sunny
NO
Means we can give diff values give different answer.
like
we can give a=80,b=100
a=180,b=20,a=20
| Is This Answer Correct ? | 3 Yes | 9 No |
Post New Answer View All Answers
How can I get random integers in a certain range?
Write a function which takes as parameters one regular expression(only ? and * are the special characters) and a string and returns whether the string matched the regular expression.
Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10
What is the difference between %d and %i?
Is Exception handling possible in c language?
How many types of errors are there in c language? Explain
Explain the difference between getch() and getche() in c?
Does sprintf put null character?
What is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?
How do you define a function?
what is the c source code for the below output? 10 10 10 10 10 10 10 10 10 10 9 9 7 6 6 6 6 6 6 9 7 5 9 7 3 2 2 5 9 7 3 1 5 9 7 3 5 9 7 4 4 4 4 5 9 7 8 8 8 8 8 8 8 8 9
Explain what is page thrashing?
An instruction which is analysed and acted upon by the processor prior to the compiler going its work a) directive b) constructive c) constant d) absolute mode
What are predefined functions in c?
How can you increase the allowable number of simultaneously open files?