I would like to find out how to get this code to work, my printf in the main function will not print the "test" string.
#include <stdio.h>
int main()
{
char b[10];
test(b);
printf("from main func: %s\n", b);
}
int test(char* buf)
{
char len[] = "test";
char *pt = len;
printf("printing ptr: %s\n", pt);
buf = pt;
printf("from test func: %s\n", buf);
return 1;
}