write a program to swap Two numbers without using temp variable.

Answer Posted / sweety

main()
{
int a=2,b=3;
a=a+b;
b=a-b;
a=a-b;
printf("%d",&a);
printf("%d",&b);
getch();
}

Is This Answer Correct ?    72 Yes 27 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the best way of making my program efficient?

557


What is character set?

675


What are the different types of control structures in programming?

650


Are the outer parentheses in return statements really optional?

566


What is wrong with this statement? Myname = 'robin';

806






How can I get random integers in a certain range?

604


Does free set pointer to null?

545


How can you tell whether a program was compiled using c versus c++?

613


largest Of three Number using without if condition?

991


With the help of using classes, write a program to add two numbers.

609


what is use of malloc and calloc?

1370


What is the total generic pointer type?

714


.main() { char *p = "hello world!"; p[0] = 'H'; printf("%s",p); }

693


What is the scope of static variables in c language?

620


can we have joblib in a proc ?

1642