How to Pass a memory address(of a string variable) to function B and assign a value(a string) from within the function B.
Here's part of the program:
#include <stdio.h>
char sales[20];
int d;
main()
{
FunctionA(&sales);
printf("%s",sales);
}
FunctionB(int a, int *b)
{
char c[]="Hello World";
a=d;
*b=c; /* This is where I am confused */
rerturn NULL;
}
I would appreciate any help.
Thanks in advance.
Cheers.