UrbanPro
true

Take BCA Tuition from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

Swapping Two Numbers

Pooja R.
17/04/2018 0 0

Q. Swap two numbers using the following function. Complete the function. You won't be allowed to use a temporary variable to swap the two numbers.

 

void swap ( ... )

{

  /* Swap code goes here */

}

 

int main ()

{

  int a[2] = {2,3};

  /* print the array so that a[0] is 3 and a[1] is 2 */

  /* swap function call and print code goes here */

}

0 Dislike
Follow 2

Please Enter a comment

Submit

Other Lessons for You

How learn c++??
Hi friends c++ one of most important language in this world . now here we take some tips how to learn c++ by self 1. students study carefully c++ books which comfortable to read. 2.Start with small...

Akshay Kaushik

0 0
0

What Is the Difference Between Function And Subroutine?
The difference is indeed very thin and it depends on the context. In general Function is a piece of code with a name, inputs (arguments) and an output (return types). That is function should always return....

Pointers And References
Are reference and pointers same? No. I have seen this confusion crumbling up among the student from the first day. So better clear out this confusion at thevery beginning. Pointers and reference both...

Implicit Typecasting & Explicit Typecasting
In C++ it is possible to cast child class reference variable to parent class Reference. When ever we are Converting a derived-class reference or pointer to a base-class reference or pointer is called...

Phishing
Phishing: Sam received an email “Congratulations. . .You have won a Lottery!!!” Now, wasn’t that tempting..l The message said: It meant that he has won the lottery. ‘ The message...
X

Looking for BCA Tuition Classes?

The best tutors for BCA Tuition Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Take BCA Tuition with the Best Tutors

The best Tutors for BCA Tuition Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more