Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- /////////////////////////////////////////////////////////
- int main()
- {
- int *p;
- int nArr[99] = {0, 1, 2,3,4,5,6,7,8,9};
- *p = nArr[3];
- printf("*p = %d\n", *p);
- }
- /*
- #include <stdio.h>
- /////////////////////////////////////////////////////////
- int main()
- {
- int *p;
- int nArr[99] = {0, 1, 2,3,4,5,6,7,8,9};
- p = nArr;
- for(int i=0; i < 10; i++)
- {
- printf(" = %d\n", p[i]);
- }
- }
- */
- /*
- #include <stdio.h>
- /////////////////////////////////////////////////////////
- int Palast(int *p)
- {
- p = p - 7;
- int nSumma = 0;
- for(int i=0; i < 10; i++)
- {
- nSumma += p[i];
- }
- return nSumma;
- }
- /////////////////////////////////////////////////////////
- int main ()
- {
- int nArr[10] = {0, 1, 2,3,4,5,6,7,8,9};
- int sum = Palast(&nArr[7]);
- printf("sum = %d\n",sum);
- }
- */
- /*
- #include<stdio.h>
- ////////////////////////////////////////////////////////////
- void foo(char *p) //
- {
- // p = p - 7;
- printf("%s\n", p-5);
- }
- /////////////////////////////////////////////////////////////
- int main()
- {
- char nArr[99] = "SONY_Pictures";
- foo(&nArr[7]);
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement