SCHOOL OF CODE BUILDERS
Learn To CODE. Become A DEVELOPER.
Pages
HOME
DATA STRUCTURES
STRINGS
ARRAYS
MATRIX
BINARY TREES
LINKED LIST
STACK
QUEUE
SORTING
SEARCHING
C
PYTHON
PSEUDOCODE
CONTEST PROBLEMS
ALGORITHMS
PATTERNS
PHP
C PUZZLES
C INTERVIEW QUESTIONS
JAVA
C++
HASHING
RECURSION
BASIC C PROGRAMS
TCS-CODEVITA
FACEBOOK
CONTACT US
C program to copy one string to another
C program to copy one string to another
Output:
Enter the source string: CodeRegister
The copied string in dest[] is CodeRegister
Implementation:
#include
#define MAX 1000000 int main(void) { char source[MAX],dest[MAX]; int i; printf("Enter the source string:\n"); scanf("%s",source); for(i=0;i<=strlen(source);i++) { dest[i]=source[i]; } printf("The copied string in dest[] is %s",dest); return 0; }
PREVIOUS
NEXT
HOME