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 |
Does free set pointer to null?
can u write a program in C, which does not use = (eqaul)or any arithmatic assignment(like -=,+=,*= etc) operator to swap to number?
why we are using semicolon at the end of printh statment
Difference between data structure and data base.
7 Answers CTS, Value Labs, Zoho,
How do I use strcmp?
write a c program to find the sum of five entered numbers using an array named number
write a program to interchange the value between two variable without using loop
Multiply an Integer Number by 2 Without Using Multiplication Operator
What is malloc return c?
Explain how does free() know explain how much memory to release?
how to implement stack work as a queue?
how many error occurs in C language ?