wat are the two methods for swapping two numbers without
using temp variable??

Answer Posted / abhishek karnani

int a=10,b=5;

a=a+b-(b=a);

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which control loop is recommended if you have to execute set of statements for fixed number of times?

803


What is the condition that is applied with ?: Operator?

654


Difference between linking and loading?

686


Which one to choose from 'initialization lists' or 'assignment', for the use in the constructor?

556


what is the differnce between programing langauge and tool? is sas is a programing langauge r tool?

1896






write a C program: To recognize date of any format even formats like "feb-02-2003","02-february-2003",mm/dd/yy, dd/mm/yy and display it as mm/dd/yy.

3329


Can you write a programmer for FACTORIAL using recursion?

606


What is difference between array and structure in c?

570


Explain what is dynamic data structure?

640


Can you please explain the difference between exit() and _exit() function?

585


What is a union?

603


write a program in c language to print your bio-data on the screen by using functions.

6239


main() { inta=10,b=20; a>=5?b=100:b=200; printf("%d ",b); }

904


what are # pragma staments?

1621


Find the second largest element in an array with minimum no of comparisons and give the minimum no of comparisons needed on an array of size N to do the same.

709