1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
func putstr(char[] str) { int i := 0; while (str[i] != '\0') { putc(str[i]); i = i + 1; } } func int main() { char[] str := new char[100]; str[0] = 'k'; str[1] = 'a'; str[2] = str[1]; str[3] = 's'; str[4] = '\n'; str[5] = '\0'; putstr(str); return 0; }