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

What is local and global variable in c?

616


Write a program with dynamically allocation of variable.

602


Do pointers need to be initialized?

558


a single linked list consists of nodes a to z .print the nodes in reverse order from z to a using recursion

2334


Is it possible to pass an entire structure to functions?

553






What is a method in c?

626


What is use of #include in c?

595


What are external variables in c?

546


What is action and transformation in spark?

594


Is c is a middle level language?

597


Why c language is called c?

569


Differentiate between #include<...> and #include '...'

617


What is the default value of local and global variables in c?

558


What is external variable in c?

612


How can you restore a redirected standard stream?

610