can u write a program in C, which does not use = (eqaul)or
any arithmatic assignment(like -=,+=,*= etc) operator to
swap to number?
Answer Posted / musa
swapping x and y using z as intermediary
memcpy(&z, &x, sizeof(x));
memcpy(&x, &y, sizeof(x));
memcpy(&y, &z, sizeof(x));
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
How can I generate floating-point random numbers?
any "C" function by default returns an a) int value b) float value c) char value d) a & b
what is the c source code for the below output? 5555555555 4444 4444 333 333 22 22 1 1 22 22 333 333 4444 4444 5555555555
Explain what are binary trees?
What is the size of empty structure in c?
Explain the difference between exit() and _exit() function?
How can I prevent another program from modifying part of a file that I am modifying?
Why we use conio h in c?
main() { printf("hello"); fork(); }
Can we use any name in place of argv and argc as command line arguments?
How can I find the modification date and time of a file?
What is the use of a ‘ ’ character?
Why static variable is used in c?
Why we not create function inside function.
Describe the header file and its usage in c programming?