For example:
Define function In C:
Code: Select all
void func(char str1[])
{ printf("Old: %s", str1); //Old: old string
str1 = "new string";
};
Code: Select all
char str1[100] = "old string";
func(str1);
printstr("New: "); printstrln(str1); //New: old string
* strings are passed to C successfully!
* but the new value of string is not returned to XC.