commit ba337f4ff9016fe247f42f90bc0d2cb616585734
parent 143ea61496c3e523d4de549ba38c6603883d22bd
Author: Amit Dutta <amitdutta4255@gmail.com>
Date: Tue, 30 Sep 2025 17:06:34 +0530
Add files via upload
Diffstat:
2 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/Letusc-exercises/luc009.c b/Letusc-exercises/luc009.c
@@ -0,0 +1,22 @@
+/* Two numbers are input through the keyboard into two locations
+C and D. Write a program to interchange the contents of C and D. */
+/* Author - Amit Dutta, Date - 30th SEP, 2025 */
+/* Let Us C, Chap - 2, Page - 37, Qn No.: G(d) */
+
+#include <stdio.h>
+int main()
+{
+ double a, b;
+ printf("Enter the two number A and B : ");
+ scanf("%lf %lf", &a, &b);
+ printf("\nBefore Interchange : ");
+ printf("\nA = %g (Memory location = %p)", a, &a);
+ printf("\nB = %g (Memory location = %p)", b, &b);
+ a = a + b;
+ b = a - b;
+ a = a - b;
+ printf("\nAfter Interchange :");
+ printf("\nA = %g (Memory location = %p)", a, &a);
+ printf("\nB = %g (Memory location = %p)", b, &b);
+ return 0;
+}+
\ No newline at end of file
diff --git a/Letusc-exercises/luc009.exe b/Letusc-exercises/luc009.exe
Binary files differ.