How to swap 3 numbers without using 4th variable?
Answers were Sorted based on User's Feedback
Answer / ilana
The target is a<-b b<-c c<- a
------------------------------------
a = a+b+c ; // a+b+c b c
c = c+b; // a+b+c b b+c
b = c-b; // a+b+c c b+c
c = a-c; // a+b+c c a
a = a-(b+c) // b c a
Is This Answer Correct ? | 12 Yes | 7 No |
List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.
Suppose I want to write a function that takes a generic pointer as an argument and I want to simulate passing it by reference. Can I give the formal parameter type void **, and do something like this? void f(void **); double *dp; f((void **)&dp);
Write program to remove duplicate in an array?
how write a addtion of two single dimensional array using of pointer in c language?
What is the mean of this statement:: if(int i=0 * i=9)
If fflush wont work, what can I use to flush input?
Write a C Programm.. we press 'a' , it shows the albhabetical number is 1, if we press 'g' it shows the answer 7.. any can help me
Explain what is dynamic data structure?
what is the use of #pragma pack, wer it is used?
Explain what happens if you free a pointer twice?
what is pointer ?
10 Answers Kernex Micro Systems,
Is array a primitive data type in c?