Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- void foo(int *p);
- /////////////////////////////////////////////////////
- int main() //
- {
- int nArr[99] = {100, 1, 2, 333};
- foo(&nArr[1]);
- foo( nArr);
- return 0;
- }
- //////////////////////////////////////////
- void foo(int *p)
- {
- printf(" p = %d\n", p);
- printf("*p = %d\n", *p);
- // printf(" p = %d\n", p);
- // printf("*p = %d\n", *p);
- }
- /*
- #include <stdio.h>
- /////////////////////////////////////////////////////
- int main() //
- {
- int n = 7;
- int *p = &n;
- printf(" n = %d\n", n);
- printf("&n = %d\n", &n);
- printf(" p = %d\n", p);
- printf("*p = %d\n", *p);
- return 0;
- }
- */
- /*
- #include <stdio.h>
- #include <locale.h> // здесь "живёт" setlocale(LC_ALL, "rus");
- int foo();
- /////////////////////////////////////////////////////
- int main() //
- {
- int n = 7;
- int *p = &n;
- setlocale(LC_ALL, "rus");
- printf("Верные символы %d", foo());
- return 0;
- }
- /////////////////////////////////////////////////////
- int foo() //
- {
- return 81;
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement