A simple string copy : String Copy « String « C / ANSI-C






A simple string copy


#include <stdio.h>
#include <string.h>

int main(void)
{
  char str[80];

  strcpy(str, "this is an example");

  puts(str);

  return 0;
}

           
       








Related examples in the same category

1.how to use strcpy (string copy)
2. Copy string: how to use strcpy
3. Copy characters from one string to another: how to use strncpy
4.String copy: assign the pointer value
5.Copy a string