answersLogoWhite

0


Best Answer

#include using namespace std; void swap(int &a, int &b); int main() { int x=5,y=3; cout

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you write a program in c to swap two values by using functions?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you write a program in C using the fprint and fscan functions?

By using those two functions in your code.


How do you write c program to perform sum of elements of matrix using pointers with functions?

i cant write


Write C program using functions to simulate a Calculator with the basic functions - square root and reciprocal?

trytytytytytytytytrf 6 bcvvtgujhy6


Write a program using recursion which should take two values and display 1st value raised to the power of second value?

Write a program using recursion which should take two values and display 1st value raised to the power of second value.


Why we write java program using classes?

Classes are well organised functions in java which help discriminate between two different functions.


Can you write a c program without using headerfile?

Yes, but if you intend to do any useful work and call any library functions, you will need to know their prototypes in order to call them. That's one of the values of the headerfile.


What is the importance of functions in a c plus plus program?

Functions are very important in C++, as you can't write the simplest program to print hello without using a function. Overall you can say that function are building blocks of a C++ program. Functions can also be defined by the programmer to reduce program size.


Write a program to illustrate the usage of pointers with arrarys and functions?

* * * * * * * * * * write the c++ program and show me brifily?


Write function integerpower that return the value of base exponent?

write a scripting to return values in functions


Write a c program to accept a numbers and generate square root cube and exponential values?

write a c program to accept a number and generate a square root cube and exponential values


Write a program to return a function using class in C Plus Plus?

Classes cannot return values, only functions can return values. But you cannot return a function from a function, you can only return a function pointer -- a pointer variable holding the address of the function you wish to return. All possible return values must be of the same type, therefore all function signatures and return types must be exactly the same -- only the name of the functions can differ.


Write a sample program using ASPNET explaining all the syntax and semantics of the program?

write a sample program using asp.net explaining all the syntax and semantics of the program