I accept string from a user then print split string words using space and print it inside a function at second iteration pch="*"
but when it is called inside main
it still has select.
How to make change in function appear in main function?
void moveNext(char * pch)
{
pch=strtok(NULL," ");
}
int main()
{
char * str;
clrscr();
printf("\n please enter sql comm.....\n");
flushall();
gets(str);
//user has enterd that string select * from std
pch = strtok(str," ");
while(pch != NULL)
{
printf("%s",pch);
moveNext(pch);
}
getch();
return 0;
}