From 7a26bc9c71890f8a673c6cb16f2ccc136a5df8bb Mon Sep 17 00:00:00 2001 From: mayank Date: Fri, 25 Oct 2019 18:52:08 +0530 Subject: [PATCH 1/2] c program --- swapfunction.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 swapfunction.c diff --git a/swapfunction.c b/swapfunction.c new file mode 100644 index 0000000..29027c5 --- /dev/null +++ b/swapfunction.c @@ -0,0 +1,21 @@ +# include +int swap(int a, int b) +{ + a=a+b; + b=a-b; + a=a-b; + printf("After swapping first value is=%d\nAfter swapping second value=%d\n",a,b); + + return a,b; + + } +int main() +{ + int c,d; + printf("Enter Two numbers\n"); + scanf("%d\n%d",&c,&d); + swap(c,d); + + +return 0; +} From 12b48e46c75b329041168a80af8be33380ff7a6f Mon Sep 17 00:00:00 2001 From: mayank Date: Fri, 25 Oct 2019 19:12:41 +0530 Subject: [PATCH 2/2] add file --- arr.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 arr.c diff --git a/arr.c b/arr.c new file mode 100644 index 0000000..fbd4872 --- /dev/null +++ b/arr.c @@ -0,0 +1,25 @@ +# include +void main() +{ +int i,n,a[100],temp; +printf("enter the number of elements\n"); +scanf("%d",&n); +printf("enter elements\n"); +for(i=0;i