Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- ////////////////////////////////////////////////////
- void foo(int *n)
- {
- ++(*n);
- }
- //////////////////////////////////////////////////// unsigned
- int main() //
- {
- int n = 100;
- foo(&n); //
- printf("%d\n", n);
- }
- /*
- #include <stdio.h>
- ////////////////////////////////////////////////////
- int foo(int n)
- {
- n ++;
- return n;
- }
- //////////////////////////////////////////////////// unsigned
- int main() //
- {
- int n = 100;
- n = foo(n); //
- printf("%d\n", n);
- }
- */
- // printf("from foo %d\n", &n);
- // printf("from main %d\n", &n);
- /*
- #include <stdio.h>
- char sz[22] = "Pictures";
- int n = 1;
- //////////////////////////////////////////////////// unsigned
- int main() //
- {
- //
- printf("SONY\n");
- printf("%s\n", "SONY");
- printf("%d\n", 9);
- printf("%s\n", sz);
- printf("%d\n", n);
- printf("%d\n", &n);
- printf("%d, %d\n", n, &n);
- }
- */
- /*
- #include <stdio.h>
- int foo();
- int n = 1111;
- //////////////////////////////////////////////////// unsigned
- int main() //
- {
- int n = 4768768; //
- printf("foo() = %d", foo() );
- }
- /////////////////////////////////////////////////////
- int foo()
- {
- return 22;
- }
- */
- /*
- #include <stdio.h>
- int n = 1111;
- //////////////////////////////////////////////////// unsigned
- int main() //
- {
- int n = 4768768; //
- printf("n = %d", ::n);
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement