How to to append a string to other string in C

1 Answer

0 votes
#include <stdio.h>
#include <string.h>
 
#define LEN 30
  
int main(void)
{
    char s1[LEN] = "working ", s2[] = "frame";
  
    strcat(s1, s2);
    puts(s1);
     
    return 0;
}
   
 
/*
    
run:
    
working frame
 
*//

 



answered Nov 20, 2015 by avibootz

Related questions

1 answer 191 views
1 answer 208 views
208 views asked Jul 15, 2015 by avibootz
2 answers 93 views
93 views asked Oct 19, 2023 by avibootz
1 answer 163 views
...