I have a send.c.
I send: "7E 40 09 00 BE EF 05 7D 5D 06 01 02 03 04 05 7E".
But at the read.c, I want "Proto = 40" as the output.
Currently in my program, the output is:
"Proto 40 09 00 BE EF 05 7D 5D 06 01 02 03 04 05 7E".
Here is my sample code:
Please help me...Code:int bufsize = 46;
int k=0;
int i;
for (i=0;i<bufsize;i++)
{
if (buf[i]=' ')
{
k++;
}
if (k==3)
{
printf("Proto %s\n", buf);
}