I would like to do the following pass a string as a function argument and the function will return a string back to main. The brief idea is as below:
String str1 = "Hello ";
String received = function(str1);
printf("%s", str3);
String function (String data){
String str2 = "there";
String str3 = strcat(str3, str1);
String str3 = strcat(str3, str2); //str3 = Hello there
return str3;
}
How do i translate that idea to C? Thank you.