From 175721a63b426355274fa9e8063f762020ab8362 Mon Sep 17 00:00:00 2001 From: RossTheRoss Date: Thu, 30 Jan 2020 16:55:04 -0600 Subject: R E A R R A N G E --- OLD/ee1301/wk5/lab4/arrayCat.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 OLD/ee1301/wk5/lab4/arrayCat.cpp (limited to 'OLD/ee1301/wk5/lab4/arrayCat.cpp') diff --git a/OLD/ee1301/wk5/lab4/arrayCat.cpp b/OLD/ee1301/wk5/lab4/arrayCat.cpp new file mode 100644 index 0000000..d711ba6 --- /dev/null +++ b/OLD/ee1301/wk5/lab4/arrayCat.cpp @@ -0,0 +1,23 @@ +#include +using namespace std; +void append (char first[], int l1, char second[], int l2, char result[200]); + +int main () { + char first[] = {'I', ' ', 'a', 'm', ' '}; + char second[] = {'i', 'r', 'o', 'n', 'm', 'a', 'n', '\0'}; + char result[200]; + append(first, 5, second, 8, result); + cout << result << endl; +} + +void append (char first[],int l1, char second[],int l2, char result[200]) { + int length=0; + for (int i=0; i