Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- char sz[123] = "TDK";
- char *psz = sz;
- ////////////////////////////////////////////////////
- int main() //
- {
- printf(" sz = %d\n", sz );
- printf("&sz = %d\n", &sz );
- printf("&sz[0] = %d\n", &sz[0]);
- printf(" psz = %d\n", psz);
- printf("&psz = %d\n", &psz); // Только так смог взять адрес
- }
- /*
- #include <stdio.h>
- char sz [55] = "TDK",
- sz2[55] = "DENON & ";
- void _strcat(char *, const char *kjllskfjalkj);
- ////////////////////////////////////////////////////
- int main() //
- {
- _strcat(sz2, sz);
- printf(sz2);
- }
- ////////////////////////////////////////////////////
- void _strcat(char *psz1, const char *psz2)
- {
- int nLen1 = 0,
- nLen2 = 0,
- i = 0;
- while(psz1[i] != 0) i++; nLen1 = i; i = 0;
- while(psz2[i] != 0) i++; nLen2 = i; i = 0;
- for(; i < nLen2; i++)
- {
- psz1[nLen1+i] = psz2[i];
- }
- }
- */
- /*
- #include <stdio.h>
- char sz [55] = "TDK",
- sz2[55];
- void szCipher(char *, const char *kjllskfjalkj);
- ////////////////////////////////////////////////////
- int main() //
- {
- szCipher(sz2, sz);
- printf(sz2);
- }
- /////////////////////////////////////////////////////
- void szCipher(char *psz2, const char *psz1)
- {
- int i = 0;
- while(psz1[i])
- {
- psz2[i] = psz1[i] - 1;
- i++;
- }
- psz2[i] = 0;
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement