#include <iostream>
using namespace std;

const int MAX_SIZE = 256;

int stringLength(char[]);
void inputString(char[], int limit);

int main() {

	char text[MAX_SIZE];
	inputString(text, MAX_SIZE);
	
	int length = stringLength(text);
	cout << "String length: " << length << endl;

	return 0;
}

void inputString(char string[], int limit) {

	cout << "Input a stirng (max" << limit << "): ";
	cin.getline(string, limit);

}

int stringLength(char string[]) {

	int i;
	for(i = 0; string[i] != '\0'; ++i);
	return i;
}
