how to swap two nubers by using a function with pointers?
Answer / reshma
void swap(int *a, int *b)
{
int tmp;
tmp=*a;
*a=*b;
*b=tmp;
}
or
void swap(int *a, int *b)
{
*a=*a^*b;
*b=*a^*b;
*a=*a^*b;
}
| Is This Answer Correct ? | 10 Yes | 1 No |
What will happen when freeing memory twice
A program to write a number of letters and numbers, such as counting and display
What is a macro?
Why do we use main function?
How to calculate Total working time using Login and logout?
2 Answers CTS, Cygnus, Infosys, Signal Networks, TCS, Wipro,
How do I get an accurate error status return from system on ms-dos?
How would you use the functions fseek(), freed(), fwrite() and ftell()?
0 Answers Aspire, Infogain, TISL,
Can you pass an entire structure to functions?
What is c system32 taskhostw exe?
what is meant by c
A collection of data with a given structure for excepting storing and providing on demand data for multiple users a) linked list b) datastructer c) database d) preprocessor
program for validity of triangle from 3 side