// concatenate string without inbuilt functions
// Date 23:40 12/10/2016
// By Ben a.k.a DreamVB

#include <iostream>

using namespace std;
using std::cout;
using std::endl;

int main(int argc, char *argv[]){
	char s0[100], s1[100];
	int i = 0;
	int j = 0;

	cout << "Enter first string : ";
	cin >> s0;
	cout << "Enter second string : ";
	cin >> s1;

	//Get s0 length
	while (s0[i] != NULL){
		i++;
	}

	//Get s1 length and append s1[n] to s0
	while (s1[j] != NULL){
		s0[i + j] = s1[j];
		j++;
	}
	//Add ending char
	s0[i + j] = '\0';

	//Set length
	i = (i + j);

	//Print out length and the string.
	cout << endl;
	cout << "Total length of string is : " << i << endl;
	cout << "New string : " << s0 << endl;

	system("pause");
	return 0;
}