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 |
main() { printf("hello"); fork(); }
any function have arguments one or more OR not . it is compulsary a) any function compulsary have one or more arguments b) any function did not have arguments. It is not compulsary c) it is optional it is not compulsary d) none of the above
Do variables need to be initialized?
What's the difference between constant char *p and char * constant p?
Write a program to generate the first n terms in the series --- 9,11,20,31,...,82
When should you use a type cast?
What does it mean when a pointer is used in an if statement?
suppose there are five integers write a program to find larger among them without using if- else
How does selection sort work in c?
Explain what are the standard predefined macros?
Describe the order of precedence with regards to operators in C.
Why & is used in c?