write a program to swap Two numbers without using temp variable.
Answer Posted / george washington
Suppose:
x=1
y=3
Redefine:
x=x+y; //Or, x=1+3=4 and
y=x-y; // y=4-3=1 and
x=x-y; // x=4-1=3
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
what is the structure pointer?
Suppose we have a table name EMP as below. We want to perform a operation in which, I want to change name ‘SMITH’ from as ‘SMITH JAIN’. Also I want to change the name of the column from ENAME to E_NAME. EMPNO ENAME JOB MGR HIREDATE SAL 7369 SMITH Coder 7902 17-DEC-80 800 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 7521 WARD SALESMAN 7698 22-FEB-81 1250
What is c token?
Why is c platform dependent?
What is null pointer constant?
What do you mean by dynamic memory allocation in c? What functions are used?
What is omp_num_threads?
What is the difference between the local variable and global variable in c?
What is scanf_s in c?
How do you generate random numbers in C?
What is type qualifiers?
What is the size of a union variable?
How can I implement a delay, or time a users response, with sub-second resolution?
What is data structure in c and its types?
What is the explanation for cyclic nature of data types in c?