how to swap two numbers with out using temp variable

Answer Posted / kusum

if (a>b)
temp=a;
a=b;
b=temp;

Is This Answer Correct ?    0 Yes 21 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Evaulate: 22%5 a) 2 b) 4 c) 0

759


What is c++ flowchart?

783


write a program that withdrawals,deposits,balance check,shows mini statement. (using functions,pointers and arrays)

1892


What is private public protected in c++?

629


Which programming language should I learn first?

658






In which header file does one find isalpha() a) conio.h b) stdio.h c) ctype.h

811


How to declare a pointer to an array of integers?

729


How come you find out if a linked-list is a cycle or not?

658


Which ide is best for c++?

656


If a base class is an adt, and it has three pure virtual functions, how many of these functions must be overridden in its derived classes?

692


What is the two main roles of operating system?

599


what is pre-processor in C++?

684


Is python better than c++?

666


Should the member functions which are made public in the base class be hidden?

658


What is a constant reference?

705