I have um simple program that just count how many args are introduced by user.
Example: insert 20 30 should say 3 args. The problem is i can count the args correctly but one of my variavles changes and i don't want.
as you can see i want to keep r as it was after user insert the comand, but when i passed to function changes.
int num_args(char *op)
temp = strtok (op," ");
while (temp != NULL)
/* printf ("%s\n",pch);*/
temp = strtok (NULL, " ");
int main ()
printf("Number of ARGS: %d and comand:%s\n",a,r);
Help me please....