The third question on page 319 of the 5th edition of c prime r plus program does not understand the last four lines. debugging found that none of these lines will repeat one letter. I have not thought about it for half a day.

  c++, question

include <stdio.h>

include <ctype.h>

void word(char *p);
int main(void)
{
char a[81];
puts(“input your string:”);
gets_s(a,81);
word(a);
puts(a);

return 0;

}

void word(charp)
{
int begin,end;
for(begin=0; isspace( *(p+begin) ) ;begin++)
continue;
for(end=begin; !isspace( *(p+end) ) ;end++)
continue;
*(p+end) = ‘\0’;
for(;
(p+begin) ! = ‘\0’; p++)
*p = *(p + begin);
*p=’\0′;
}

Last oneforCycle, should not be(p+begin) ! = '\0', change to*(p+begin) ! = '\0'.