write a program to swap Two numbers without using temp variable.
Answer Posted / shubham agarwal
the answer is simple
a=a*b;
b=a/b;
a=a/b;
this is one of the few possible ways to swap
simple app. of +,- can also brong the result
by
shubham agarwal
shubham.agarwal363@yahoo.com from NIT Srinagar
| Is This Answer Correct ? | 8 Yes | 8 No |
Post New Answer View All Answers
struct screen_pos{ int row, col } ;move_right(cursor)struct screen_pos *cursor;{ cursor.col++; } /* This statementhas a syntax error */What is the correct statement a) cursor.col = cursor.col + 1; b) col.cursor++; c) *cursor.col++; d) pointer
What are the types of bitwise operator?
main() { int i = 10; printf(" %d %d %d ", ++i, i++, ++i); }
Is it possible to pass an entire structure to functions?
What is scope rule in c?
Function which gives a pointer to a binary trees const an integer value at each code, return function of all the nodes in binary tree.?
What is a pointer in c plus plus?
What type is sizeof?
What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
What is signed and unsigned?
What is ## preprocessor operator in c?
What is the difference between strcpy() and memcpy() function in c programming?
why do some people write if(0 == x) instead of if(x == 0)?
Explain what is wrong with this program statement?
Can we increase size of array in c?