I would like to ask about the strcpy or string how to use when the inputs:i like to play baseball
then the output:
i
like
to
play
baseball

I hope there is recommendable code for that programs

There's no need for string handling functions. You can use scanf to get that behavior:

#include <stdio.h>

int main ( void )
{
  char word[100];

  printf ( "Enter some words: " );

  while ( scanf ( "%99s", word ) == 1 )
    puts ( word );

  return 0;
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.