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 / sayantan ghosh
This will never give a result as its call by value and even the values arnt printed in the function so the values in main will only be present
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Write a program which returns the first non repetitive character in the string?
Write the program that calculates and prints the average of several integers. Assume that the last value read is sentinel 9999.
Tell me with an example the self-referential structure?
in case any function return float value we must declare a) the function must be declared as 'float' in main() as well b) the function automatically returned float values c) function before declared 'float' keyword d) all the above
program to find error in linklist.(i.e find whether any node point wrongly to previous nodes instead of next node)
Tell me when would you use a pointer to a function?
Why dont c comments nest?
Why is this loop always executing once?
What is wrong with this program statement?
c language supports bitwise operations, why a) 'c' language is system oriented b) 'c' language is problem oriented c) 'c' language is middle level language d) all the above
How do you list files in a directory?
How do you use a 'Local Block'?
Explain which of the following operators is incorrect and why? ( >=, <=, <>, ==)
How is a null pointer different from a dangling pointer?
What is structure of c program?