Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

K&R Exercise 5.3

a guest Sep 19th, 2018 114 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. #include <stdio.h>
  2.  
  3. void strcat1(char *, char *);
  4.  
  5. int main()
  6. {
  7.     char *s = "Pointer";
  8.     char *t = "Array";
  9.     strcat1(s,t);
  10.     printf("\n");
  11.     puts(s);
  12.     printf("\n");
  13.     return 0;
  14. }
  15.  
  16. void strcat1(char *s, char *t)
  17. {
  18.     while(*s++ != '\0')
  19.         ;
  20.     while(*s++ = *t++)
  21.         ;
  22. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top