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 / moorthy
here a and b are local variable in function swap() where a
and b are swapped inside swap().so that swaping does not
affect variable in main().
Is This Answer Correct ? | 12 Yes | 1 No |
Post New Answer View All Answers
which type of aspect you want from the student.
what value is returned to operating system after program execution?
How can I implement sets or arrays of bits?
What is static identifier?
A SIMPLE PROGRAM OF GRAPHICS AND THEIR OUTPUT I WANT SEE WAHAT OUTOUT OF GRAPHICS PROGRAM
What is the difference between functions abs() and fabs()?
Can an array be an Ivalue?
Differentiate between full, complete & perfect binary trees.
What are enumerated types?
GIven a sequence of characters. How will you convert the lower case characters to upper case characters. ( Try using bit vector - sol given in the C lib -> typec.h)
What is the difference between array and pointer?
Where are c variables stored in memory?
What is the difference between procedural and declarative language?
An integer that indentifies the position of a data item in a sequence of data items a) value b) number c) index d) all of the above
What is time complexity c?