how to swap two numbers with out using temp variable
Answer Posted / pranav
//swaping of 2 numbers without using temp variable
//a=5 & b=6
a=a+b; //a=30
b=a-b; //b=5
a=a-b; //a=6
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is using namespace std in c++?
We use library functions in the program, in what form they are provided to the program?
Which compiler does turbo c++ use?
Define a nested class. Explain how it can be useful.
Which ide is best for c++?
Can constructor be static in c++?
There are 100 students in a class. The management keep information in two tables. Those two tables are given like Roll no Name Age 001 ABC 15 002 XYZ 14 and Roll No Subject Marks 001 Math 75 001 Physics 55 002 Math 68 001 Hindi 69 They want the information like this Roll No Name Hindi Physics Math Total 001 ABC 69 55 75 199 002 XYZ 68 74 84 226 And Roll No Suject Highest 001 Math 98 007 Physics 84 021 Hindi 74 All 275 All information is kept in structure in main memory. You have to find last two tables.
Write a Program to find the largest of 4 no using macros.
Define the process of handling in case of destructor failure?
What is the history of c++?
What are disadvantages of pointers?
Is python written in c or c++?
why is c++ called oops? Explain
What is abstract class in c++?
what is the use of void main() in C++ language?