smartsarath2003
Programmer
Hai,
I am trying to implement the fallowing code.But I am getting only one letter output "H". Its just trying to return a string from a function, but I think the problem is with function prototype declaration to return a srting value.
Can any one help me with this please!!!
#include <stdio.h>
char _stdcall _export Read_SerialPort(void)
{
char data[100]="Hello";
return *data;
}
void main ()
{
char result[100]="";
*result= Read_SerialPort();
}
Thnaks in advance....
I am trying to implement the fallowing code.But I am getting only one letter output "H". Its just trying to return a string from a function, but I think the problem is with function prototype declaration to return a srting value.
Can any one help me with this please!!!
#include <stdio.h>
char _stdcall _export Read_SerialPort(void)
{
char data[100]="Hello";
return *data;
}
void main ()
{
char result[100]="";
*result= Read_SerialPort();
}
Thnaks in advance....