Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- int len(char s[])
- {
- int i;
- int count=0;
- for(i=0; s[i]!='\0'; i++)
- count++;
- return count;
- }
- int cpy(char s1[], char s2[])
- {
- int i;
- for(i=0; s2[i]!='\0'; i++)
- s1[i]=s2[i];
- s1[i]='\0';
- printf("%s", s1);
- }
- int cat(char s3[], char s4[])
- {
- int i;
- for(i=0; s3[i]!=']0' && s4[i]!='\0'; i++)
- {
- }
- }
- int main()
- {
- char s[]="asdf";
- printf("strlen is %d\n", len(s));
- char s1[]="asdfg";
- char s2[]="asdfgh";
- cpy(s1, s2);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement