Advertisement
Guest User

Untitled

a guest
Dec 1st, 2015
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<string.h>
  3. int main()
  4. {
  5. char s1[]="string";
  6. char s2[]="Copy";
  7.  
  8. strcat(s2,s1);
  9. puts(s2);
  10.  
  11.  
  12. }
  13.  
  14.  
  15.  
  16.  
  17. another
  18.  
  19. #include <stdio.h>
  20. #include <string.h>
  21.  
  22. int main ()
  23. {
  24. char s[100];
  25. int length;
  26.  
  27. strcpy(s, "My name is Niaz");
  28.  
  29. length = strlen(s);
  30. printf("Length of %s is %d\n", s, length);
  31.  
  32. return(0);
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement