smartsarath2003
Member level 4
Hai,
I want to return a srting buffer from a C function. I have trouble doing that now
My sample code:
-----------------------------------------
char myfunction(void)
{
int i=1;
char buff[25]="Hai";
i=i+1;
return *buff;
}
char str_value = myfunction(void);
--------------------------------------------------
I am getting "88" in str_value when I return buff[25] and "115" when I return *buff, but not "Hai" in both cases.
Can some one please help me:!:
Thanks
I want to return a srting buffer from a C function. I have trouble doing that now
My sample code:
-----------------------------------------
char myfunction(void)
{
int i=1;
char buff[25]="Hai";
i=i+1;
return *buff;
}
char str_value = myfunction(void);
--------------------------------------------------
I am getting "88" in str_value when I return buff[25] and "115" when I return *buff, but not "Hai" in both cases.
Can some one please help me:!:
Thanks