"Why dont u use strtok" i didn't now this function till now :@ damn
the only difference is this for loop
Code:for(x=0 , g=0 , f=0; buffer[x]!='\0' ; x++)
i didn't get why didn't it work till you put f++ in the loop body ???Code:for(x=0 , g=0 , f=0; buffer[x]!='\0' ; x++,f++)
i tried to get this by doing this
but in hereCode:for(x=0 , f=0; x>20 ; x++,f++)
{
printf("%d %d\n",x,f);
}
/*
output
0 0
1 1
.. ..
so it's like starting with word[1] not word[0]????Code:for(x=0 , g=0 , f=0; buffer[x]!='\0' ; x++)
{
f++;
printf("%d %d\n",x,f);
}
/* output
0 1
1 2
2 3
*/
thanks so much for your help

