Mega Code Archive

 
Categories / C / String
 

How to copy a string

#include <string.h> #include <stdio.h> int main(void) {   char str[5];   strcpy(str, "this is a test");   printf(str);   return 0; }