My exposure to arrays and pointers are bit limited. And concatened strings even less ( it was not covered in my class so I had to google it. ) So I know there are errors. I can not use any of C string libary functions. Thoughts?
#include <stdio.h>
char *strcat385(char string1[ ], char string2[ ]) {
int i = 0;
while(str[i])
{
string1[i] = str[i];
++i;
}
++i;
while(str2[])
{
string1[i] = strign2[];
++i;
}
string1 [i] = '\0';
}
int main( ) {
char str[50] = "CSC course 385 ",
str2[ ] = "sections 701, 710";
printf("The return from strcat373:\n%s\n", strcat(str, str2));
printf("string1 is %s\nstring2 is %s\n", str, str2);
}