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
.main() { char *p = "hello world!"; p[0] = 'H'; printf("%s",p); }
Explain with the aid of an example why arrays of structures don’t provide an efficient representation when it comes to adding and deleting records internal to the array.
What is the purpose of sprintf?
Why is it usually a bad idea to use gets()? Suggest a workaround.
Explain how do you determine a file’s attributes?
Can the curly brackets { } be used to enclose a single line of code?
Explain how can I convert a number to a string?
A routine usually part of the operation system that loads a program into memory prior to execution a) linker b) loader c) preprocessor d) compiler
Explain what is output redirection?
What is pragma in c?
What is the explanation for the dangling pointer in c?
What are keywords c?
in programming languages a statement or part of a statement that specifies several different execution sequences a) constructs b) distructs c) executes d) none
What are identifiers in c?
What is fflush() function?