Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- char sz[99] = "SONY Pictures";
- ///////////////////////////////////////////////////////
- int main() //
- {
- char *psz = &sz[8];
- for(int i = 0; i < 13; i = i + 1)
- {
- printf("%c address = %d \n", sz[i], &sz[i]);
- }
- psz = &sz[3];
- printf("%c \n", *psz);
- }
- /*
- #include <stdio.h>
- char sz[99] = "SONY Pictures";
- ///////////////////////////////////////////////////////
- int main() //
- {
- for(int i = 0; i < 13; i = i + 1)
- {
- printf("%c address = %d \n", sz[i], &sz[i]);
- }
- }
- */
- /*
- #include <stdio.h>
- char sz[99] = "SONY Pictures";
- ///////////////////////////////////////////////////////
- int main() //
- {
- int n = 15;
- int i = 0;
- char c = 'E';
- //for(int i = 0; i <= 4; i += 1)
- //{
- Dima: printf("%c - \n", sz[i]);
- i++;
- if(i < 4) goto Dima;
- //}
- // sz[2] = 0;
- printf("%s ", sz);
- }
- */
- /*
- #include <stdio.h>
- char sz[99] = "SONY Pictures";
- ///////////////////////////////////////////////////////
- int main() //
- {
- int n = 15;
- char c = 'E';
- for(int i = 0; i <= 4; i += 1)
- {
- printf("%c - \n", sz[i]);
- }
- sz[2] = 0;
- printf("%s ", sz);
- }
- */
- /*
- #include <stdio.h>
- char sz[99] = "SONY";
- ///////////////////////////////////////////////////////
- int main() //
- {
- int n = 15;
- char c = 'E';
- printf("c = %c \n", c);
- }
- */
- /*
- #include <stdio.h>
- ///////////////////////////////////////////////////////
- int main() //
- {
- int n = 15;
- char c = 'E';
- printf("size of n = %d \n", sizeof(n ));
- printf("size of c = %d \n", sizeof(char));
- }
- */
- /*
- #include <stdio.h>
- ///////////////////////////////////////////////////////
- int main() //
- {
- int n = 15;
- char sz[99] = "SONY = %d %s Dima\n";
- printf(sz, n, "Sobolev");
- printf("%s Pictures\n", "SONY");
- }
- */
- /*
- #include <stdio.h>
- ///////////////////////////////////////////////////////
- int main() //
- {
- printf("const = %d %s Dima\n", 23, "Sobolev");
- printf("%s Pictures\n", "SONY");
- }
- */
- /*
- #include <stdio.h>
- #include <time.h>
- #include <stdlib.h>
- void foo(int *, int *cvbcvbcv);
- ///////////////////////////////////////////////////////
- int main() //
- {
- srand(time(0));
- int nArr[15] = {1, 22, 33, 44, 55, 66, 77, 88};
- int nA_2[15];
- nArr[14] = 12;
- for(int i = 0; i < 20; i++)
- {
- nA_2[i] = rand() %200;
- }
- printf("nArr = %d\n", nArr);
- foo(&nArr[0], &nA_2[0]);
- }
- ///////////////////////////////////////////////////////
- void foo(int *p, int *p2) //
- {
- for(int i = -5; i < 20; i++)
- {
- printf("%3d, ", p [i]);
- printf("%3d\n", p2[i]);
- }
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement