Using the notation, for example str [k] or *(str + k) toaccess to kth is not allowed; you should however move a pointerrelated to str to kth position, dereferencing it to get its content.
Am not sure I got the restriction quite right. Am going to give an example with how a simple implementation of strcmp works hope you can apply this to your problem. It should only be a slight modification.
Code:
int strcmp(const char *lhs, const char *rhs)
{
while(*lhs && (*lhs == *rhs))
lhs++;
rhs++;
return *lhs - *rhs;
}
Probably not the best example out there but the important thing is the pointer arithmetic. If you increment a pointer it points to the next element in the array.
In you case you should have a pointer pointing to the last item in the string while another one points to the first then decrement one while incrementing the other and comparing until
-The pointers are equal, that is, the point to the same location in the string, in which case the string will be symmetrical.
-Until the characters pointed to by the pointers do not match in which case the string will not be symmetrical.
Edit: Well, I see you mention strtok in the topic but nowhere in the problem description. Do you have a requirement to use strtok ?