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
where are auto variables stored? What are the characteristics of an auto variable?
What are global variables and how do you declare them?
Explain what is #line used for?
Why & is used in c?
What is the use of a conditional inclusion statement in C?
What is a pointer value and address in c?
What is pointer and structure in c?
Write a program to identify if a given binary tree is balanced or not.
Explain what is the general form of a c program?
What is the collection of communication lines and routers called?
how can f be used for both float and double arguments in printf? Are not they different types?
What is extern keyword in c?
Describe how arrays can be passed to a user defined function
What is meant by type casting?
The __________ attribute is used to announce variables based on definitions of columns in a table?