Answers for "concatenate 3 strings in c and print"

C
4

concatenate two strings in c

#include <stdio.h>
#include <string.h>
int main()
{
  char a[1000], b[1000];

  printf("Enter the first string\n");
  gets(a);

  printf("Enter the second string\n");
  gets(b);

  strcat(a, b);

  printf("String obtained on concatenation: %s\n", a);

  return 0;
}
Posted by: Guest on May-10-2020
0

printing out 2 strings in c

// Use of Getstring 
#include<stdio.h>
int main(){
char name[100];
int age;
printf("Enter your name\n");
gets(name);
printf("your name is %s", name);
}
//In the terminal your name is (name input)
Posted by: Guest on February-03-2021

Code answers related to "concatenate 3 strings in c and print"

Code answers related to "C"

Browse Popular Code Answers by Language