Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <iostream>
- using namespace std;
- void foo(int *lkjkljkljlkjklj, int *);
- /////////////////////////////////////////////////
- int main()
- {
- int nMax = 123;
- int *p = &nMax;
- int nMinimum = 987;
- printf("(printf)p = %x\n", p);
- cout << " *p = " << *p << endl;
- cout << " p = " << p << endl;
- foo(p, &nMinimum);
- return 0;
- }
- ////////////////////////////////////////////////
- void foo(int *pnMax, int *p)
- {
- int RRR = *p;
- cout << " nMinimum = " << RRR << endl;
- cout << "&nMinimum = " << p << endl;
- cout << " nMax = " << *pnMax << endl;
- cout << "&nMax = " << pnMax << endl;
- }
- /*
- #include <stdio.h>
- #include <iostream>
- using namespace std;
- void foo();
- //#include "f.h"
- int nMax = 123;
- int *p = &nMax;
- /////////////////////////////////////////////////
- int main()
- {
- printf("(printf)p = %x\n", p);
- cout << " *p = " << *p << endl;
- cout << " p = " << p << endl;
- foo();
- return 0;
- }
- ////////////////////////////////////////////////
- void foo()
- {
- cout << " nMax = " << nMax << endl;
- cout << "&nMax = " << &nMax << endl;
- }
- */
- /*
- #include <stdio.h>
- #include <iostream>
- using namespace std;
- int nMax = 123;
- int *p = &nMax;
- /////////////////////////////////////////////////
- int main()
- {
- printf("(printf)p = %x\n", p);
- cout << " *p = " << *p << endl;
- cout << " p = " << p << endl;
- cout << " nMax = " << nMax << endl;
- cout << "&nMax = " << &nMax << endl;
- return 0;
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement