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 |
How is pointer initialized in c?
Why can’t we compare structures?
what is the differnce between programing langauge and tool? is sas is a programing langauge r tool?
how to write a c program to print list of fruits in alpabetical order?
How can you pass an array to a function by value?
Where are local variables stored in c?
Study the Following Points: a.One Cannot Take the address of a Bit Field b.bit fields cannot be arrayed c.Bit-Fields are machine Dependant d.Bit-fields cannot be declared as static 1. Which of the Following Statements are true w.r.t Bit- Fields A)a,b&c B)Only a & b C)Only c D)All
What is the meaning of && in c?
what is a pointer
4 Answers Bank Of America, TCS,
What is the explanation for cyclic nature of data types in c?
By using C language input a date into it and if it is right?
How can you allocate arrays or structures bigger than 64K?