answersLogoWhite

0

You have to pass the address of the variables.

void swap (int *pa, int *pb)

{

...

}

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

Write a program to find the product of two numbers using Halving and Doubling method?

i need this answer


What is program in c to swap entered two numbers without using third variable?

The required c program is given below /*Swapping(interchange) the two entered numbers*/ #include<stdio.h> main() { /*Without using third variable*/ int a,b,t; printf("Enter a:"); scanf("%d",&a); printf("Enter b:"); scanf("%d",&b); a=a+b; b=a-b; a=a-b; printf("\n After swapping without using third variable"); printf("\na=%d\nb=%d",a,b); }


How to write a C program to find largest 2 numbers using pointers?

program to find maximum of two numbers using pointers


How do you convert numbers into words using java?

Using toString() method


Program to count the number of numbers in an array using 8085 microprocessor?

A program which is used to count the number of numbers in an array using a 8085 microprocessor is known as a assembly language program.


How do you get the sum of two numbers?

The best method is to add the numbers, using arithmetic.


Swapping of number with using third variable?

To swap two numbers N1 and N2, using a third variable T... T = N1; N1 = N2; N2 = T;


Do decimal numbers have factorials?

by using the Gamma method apparently...:)


Differences between declaring a method and calling a method?

Declaring a method is when you code for what the method will perform. When you call a method, you are using the method you have written in another part of the program, (or inside the method if it is recursive).


What is a method of writing very large or very small numbers by using the powers of ten?

Scienctific method


How do you write a program to read set of numbers using by an array and display the ascending order of the given input numbers?

To write a C++ program to display the student details using class and array of object.


What is a method for representing numbers using only 0 and 1?

binary system