diff options
author | prathamesh | 2013-07-02 12:25:33 +0530 |
---|---|---|
committer | prathamesh | 2013-07-02 12:25:33 +0530 |
commit | 8a3016a88af5c4a09e8b5683f1e305e9100f3562 (patch) | |
tree | c5878e30b59ee084f6b5fd6c5f3e98a097e4960e /testapp/c_cpp_files | |
parent | 33366bfa87d62d433cc7541e4699b61be78e5024 (diff) | |
download | online_test-8a3016a88af5c4a09e8b5683f1e305e9100f3562.tar.gz online_test-8a3016a88af5c4a09e8b5683f1e305e9100f3562.tar.bz2 online_test-8a3016a88af5c4a09e8b5683f1e305e9100f3562.zip |
c files moved
Diffstat (limited to 'testapp/c_cpp_files')
-rw-r--r-- | testapp/c_cpp_files/add.c | 4 | ||||
-rw-r--r-- | testapp/c_cpp_files/add.cpp | 6 | ||||
-rw-r--r-- | testapp/c_cpp_files/array_sum.c | 10 | ||||
-rw-r--r-- | testapp/c_cpp_files/array_sum.cpp | 10 | ||||
-rw-r--r-- | testapp/c_cpp_files/fact.c | 10 | ||||
-rw-r--r-- | testapp/c_cpp_files/fact.cpp | 16 | ||||
-rw-r--r-- | testapp/c_cpp_files/greatest.c | 15 | ||||
-rw-r--r-- | testapp/c_cpp_files/greatest.cpp | 15 | ||||
-rw-r--r-- | testapp/c_cpp_files/hello_name.c | 16 | ||||
-rw-r--r-- | testapp/c_cpp_files/palindrome.c | 20 | ||||
-rw-r--r-- | testapp/c_cpp_files/palindrome.cpp | 19 |
11 files changed, 0 insertions, 141 deletions
diff --git a/testapp/c_cpp_files/add.c b/testapp/c_cpp_files/add.c deleted file mode 100644 index c829971..0000000 --- a/testapp/c_cpp_files/add.c +++ /dev/null @@ -1,4 +0,0 @@ -int add(int a,int b) -{ - return a-b; -} diff --git a/testapp/c_cpp_files/add.cpp b/testapp/c_cpp_files/add.cpp deleted file mode 100644 index d3b7897..0000000 --- a/testapp/c_cpp_files/add.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include<stdio.h> -int add(int a,int b) -{ - printf("All Correct"); - return a; -} diff --git a/testapp/c_cpp_files/array_sum.c b/testapp/c_cpp_files/array_sum.c deleted file mode 100644 index 619a23c..0000000 --- a/testapp/c_cpp_files/array_sum.c +++ /dev/null @@ -1,10 +0,0 @@ -int array_sum(int a[5]) -{ - int i=0, sum=0; - for(i=0;i<5;i++) - { - sum = sum + a[i]; - } - return sum; -} - diff --git a/testapp/c_cpp_files/array_sum.cpp b/testapp/c_cpp_files/array_sum.cpp deleted file mode 100644 index 9b82d3b..0000000 --- a/testapp/c_cpp_files/array_sum.cpp +++ /dev/null @@ -1,10 +0,0 @@ -int array_sum(int a[]) -{ - int i=0, sum=0; - for(i=0;i<5;i++) - { - sum = sum + a[i]; - } - return sum; -} - diff --git a/testapp/c_cpp_files/fact.c b/testapp/c_cpp_files/fact.c deleted file mode 100644 index e3665f5..0000000 --- a/testapp/c_cpp_files/fact.c +++ /dev/null @@ -1,10 +0,0 @@ -int factorial(int a) -{ - int i,fact=1; - for(i=1;i<=a;a--) - { - fact=fact*a; - } - return fact; - -} diff --git a/testapp/c_cpp_files/fact.cpp b/testapp/c_cpp_files/fact.cpp deleted file mode 100644 index f9b7458..0000000 --- a/testapp/c_cpp_files/fact.cpp +++ /dev/null @@ -1,16 +0,0 @@ -#include<stdio.h> -int fact = 1; -int factorial(int a) -{ - printf("%d\n",a); - if(a<1) - { - printf("\nfinal"); - return 1; - } - else - { - printf("count\n"); - return a*factorial(a-1); - } -} diff --git a/testapp/c_cpp_files/greatest.c b/testapp/c_cpp_files/greatest.c deleted file mode 100644 index 0194855..0000000 --- a/testapp/c_cpp_files/greatest.c +++ /dev/null @@ -1,15 +0,0 @@ -int greatest(int a,int b,int c) -{ - if(a>b && a>c) - { - return a; - } - else if(b>c) - { - return b; - } - else - { - return c; - } -} diff --git a/testapp/c_cpp_files/greatest.cpp b/testapp/c_cpp_files/greatest.cpp deleted file mode 100644 index 0194855..0000000 --- a/testapp/c_cpp_files/greatest.cpp +++ /dev/null @@ -1,15 +0,0 @@ -int greatest(int a,int b,int c) -{ - if(a>b && a>c) - { - return a; - } - else if(b>c) - { - return b; - } - else - { - return c; - } -} diff --git a/testapp/c_cpp_files/hello_name.c b/testapp/c_cpp_files/hello_name.c deleted file mode 100644 index 8fa2519..0000000 --- a/testapp/c_cpp_files/hello_name.c +++ /dev/null @@ -1,16 +0,0 @@ -#include<string.h> -#include<stdio.h> - -char *message(char a[]) -{ - return (strcat("hello",a)); -} - -main() -{ - printf("he\n"); - char q[]="re"; - char s[20]; - s= message(q); - printf("%s",s); -} diff --git a/testapp/c_cpp_files/palindrome.c b/testapp/c_cpp_files/palindrome.c deleted file mode 100644 index 236d963..0000000 --- a/testapp/c_cpp_files/palindrome.c +++ /dev/null @@ -1,20 +0,0 @@ -#include <stdbooll.h> -bool palindrome(int a) -{ - int n1, rev = 0, rem; - n1 = a; - while (a > 0) - { - rem = a % 10; - rev = rev * 10 + rem; - a = a / 10; - } - if (n1 == rev) - { - return true; - } - else - { - return false; - } -} diff --git a/testapp/c_cpp_files/palindrome.cpp b/testapp/c_cpp_files/palindrome.cpp deleted file mode 100644 index aae5dd1..0000000 --- a/testapp/c_cpp_files/palindrome.cpp +++ /dev/null @@ -1,19 +0,0 @@ -bool palindrome(int n) -{ - int n1, rev = 0, rem; - n1 = n; - while (n > 0) - { - rem = n % 10; - rev = rev * 10 + rem; - n = n / 10; - } - if (n1 == rev) - { - return true; - } - else - { - return false; - } -} |