Guest User

Untitled

a guest
Apr 24th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. char string1[50] = "This is a character array, it can be 50 characters.";
  6. char string2[50];
  7.  
  8. char* ps1 = string1;
  9. char* ps2 = string2;
  10.  
  11. printf("\nString1 = %s\nString2 = %s\n", string1, string2);
  12.  
  13. while (*ps2++=*ps1++);
  14.  
  15. printf("\nString1 = %s\nString2 = %s\n", string1, string2);
  16. }
Add Comment
Please, Sign In to add comment