Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- int n;
- char c;
- int array[123]; // 4 * 123 bytes
- char sz[123] = " Hello, SONY!",
- sz1[123] = {65, 43, 66, 44, 67};
- int _strlen(const char *psz);
- ////////////////////////////////////////////////////
- int main() //
- {
- sz[8] = 85;
- strcat(sz1, sz); // strcpy
- printf("string = %s \n", sz1);
- int n = _strlen(sz1);
- printf("sz1 len = %d", n);
- return 0;
- }
- ////////////////////////////////////////////////////////////
- int _strlen(const char *psz)
- {
- int n = 0;
- for(int i = 0; psz[i] != 0; i++)
- {
- n ++;
- }
- n += 100;
- return n;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement