Answers for "how to copy two strings in c"

C
3

how to combine strings in c

#include <stdio.h>
#include <string.h>
int main() {
	char str[80];
strcpy(str, "these ");
strcat(str, "strings ");
strcat(str, "are ");
strcat(str, "concatenated.");
printf("%sn", str);
}
Posted by: Guest on February-06-2021
0

c copy 2 strings

#include <string.h>
#include <stdio.h>
int main()
{
  char str[9]="A string";
  char copy[9];
  strcpy(copy,str);
  printf("Copied String : %s",copy);
  return 0;
}
Posted by: Guest on October-28-2020

Code answers related to "C"

Browse Popular Code Answers by Language