Advertisement
aiNayan

6(iv)

Nov 30th, 2020
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. #include <stdio.h>
  2. int main()
  3. {
  4. char ch[50], copy[100], i;
  5. printf("Enter a string: ");
  6. gets(ch);
  7. for (i = 0; ch[i] != '\0'; i++)
  8. copy[i] = ch[i];
  9. copy[i] = '\0';
  10. printf("copy = %s", copy);
  11. return 0;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement