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
Why dont c comments nest?
What is a void pointer? When is a void pointer used?
write a program to concatenation the string using switch case?
What is function prototype in c with example?
Can you write the algorithm for Queue?
How many levels deep can include files be nested?
Should I learn data structures in c or python?
What is the use of bitwise operator?
Why can’t constant values be used to define an array’s initial size?
What is volatile variable how do you declare it?
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)
When should volatile modifier be used?
Explain the difference between malloc() and calloc() function?
plz let me know how to become a telecom protocol tester. thank you.
what is the syallabus of computer science students in group- 1?