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 / prateek
Actually this code is for interchanging values of two
variables without using third variable
| Is This Answer Correct ? | 9 Yes | 1 No |
Post New Answer View All Answers
Is that possible to store 32768 in an int data type variable?
Explain the difference between the local variable and global variable in c?
Explain what is the difference between functions abs() and fabs()?
When the macros gets expanded?
When a c file is executed there are many files that are automatically opened what are they files?
What are extern variables in c?
Who is the founder of c language?
Array is an lvalue or not?
Explain what is operator promotion?
What is function prototype in c with example?
What are the __date__ and __time__ preprocessor commands?
what is the difference between class and unio?
Explain what are bus errors, memory faults, and core dumps?
How is a macro different from a function?
Can a pointer be volatile in c?