Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int foo(int);
- int (*pf)(int) = foo;
- //////////////////////////////////////////////////// unsigned
- int main() //
- {
- printf("foo address = %d\n" , foo);
- printf("pf address = %d\n" , pf);
- foo(101);
- pf (333);
- }
- /////////////////////////////////////////////////////
- int foo(int n)
- {
- printf("n = %d\n" , n);
- }
- /*
- #include <stdio.h>
- int n = 889;
- int &a = n;
- //////////////////////////////////////////////////// unsigned
- int main() //
- {
- printf("n address = %d\n", &n);
- printf("a address = %d\n", &a);
- }
- */
- /*
- #include <stdio.h>
- namespace Dima
- {
- int n = 9;
- }
- using namespace Dima;
- int j = 14;
- //////////////////////////////////////////////////// unsigned
- int main() //
- {
- printf("%d\n", Dima::n);
- }
- */
- /*
- #include <stdio.h>
- void foo();
- //////////////////////////////////////////////////// unsigned
- int main() //
- {
- foo();
- foo();
- }
- /////////////////////////////////////////////////////
- void foo()
- {
- static int n = 9;
- printf("%d\n", n);
- n += 7;
- }
- */
- /*
- #include <stdio.h>
- void foo(int *pjkhkjhkjhkj);
- //////////////////////////////////////////////////// unsigned
- int main() //
- {
- int nArr[33];
- for(int i = 0; i < 31; i++)
- {
- nArr[i] = i;
- }
- foo( &nArr[0] );
- }
- /////////////////////////////////////////////////////
- void foo(int *p)
- {
- for(int i = 0; i < 7; i++)
- {
- printf("%d\n", p[-i]);
- }
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement