Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- void stringCopy(char fromStr[], char toStr[]){
- int i=0;
- while (fromStr[i]!='\0'){
- toStr[i]=fromStr[i];
- i++;
- }
- toStr[i]='\0';
- }
- int main(void) {
- char s1[30]="QWERTY";
- char s2[50];
- stringCopy(s1, s2);
- printf("%s", s2);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment