Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Buy a domain name - Register cheap domain names from $0.99 - Namecheap

Scalable Hosting That Grows With You

Secure & Reliable Web Hosting, Free Domain, Free SSL, 1-Click WordPress Install, Expert 24/7 Support

Semrush - keyword research tool

Boost your online presence with premium web hosting and servers

Disclosure: My content contains affiliate links.

39,948 questions

51,890 answers

573 users

How to copy text in C

1 Answer

0 votes
#include <stdio.h>
#include <string.h>
 
int main() {
    char text1[30];
    char text2[] = "C Programming";
 
    strcpy(text1, text2);
     
    puts(text1);
    puts(text2);
    
    return 0;
}
 
 
 
/*
run:
 
C Programming
C Programming
 
*/

 



answered Dec 26, 2020 by avibootz

Related questions

1 answer 132 views
132 views asked Dec 26, 2020 by avibootz
3 answers 223 views
223 views asked Sep 29, 2015 by avibootz
2 answers 225 views
1 answer 119 views
119 views asked Aug 7, 2023 by avibootz
1 answer 160 views
...