Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- char sz[99] = "Paramout_Pictures";
- void foo(char *psz);
- int n = 77;
- int *p = &n;
- ////////////////////////////////////////////////////////
- int main() //
- {
- foo(sz);
- }
- ////////////////////////////////////////////////////
- void foo(char *psz)
- {
- psz += 9;
- printf("%s", psz);
- }
- /*
- #include <stdio.h>
- void foo(int &pn);
- ////////////////////////////////////////////////////////
- int main() //
- {
- int nx = 123;
- printf("address nx = %d\n", &nx);
- foo(nx);
- printf("from main nx = %d", nx);
- }
- //////////////////////////////////
- void foo(int &a)
- {
- a = a - 100;
- // *pn = *pn - 100;
- printf("address a = %d\n", &a);
- }
- */
- /*
- #include <stdio.h>
- void foo(int *pn);
- ////////////////////////////////////////////////////////
- int main() //
- {
- int nx = 123;
- printf("address nx = %d\n", &nx);
- foo(&nx);
- printf("from main nx = %d", nx);
- }
- //////////////////////////////////
- void foo(int *pn)
- {
- int &a = *pn;
- a = a - 100;
- // *pn = *pn - 100;
- printf("pn = %d\n", pn);
- }
- */
- /*
- #include <stdio.h>
- void foo(int *pn);
- ////////////////////////////////////////////////////////
- int main() //
- {
- int nx = 123;
- printf("address nx = %d\n", &nx);
- foo(&nx);
- printf("from main nx = %d", nx);
- }
- //////////////////////////////////
- void foo(int *pn)
- {
- *pn = *pn - 100;
- printf("pn = %d\n", pn);
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement