Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int n = 7;
- int *p = &n;
- //////////////////////////////////////////////////
- int main() //
- {
- printf(" n = %d\n", n);
- printf(" p = %d\n", p);
- printf("&p = %d\n", &p);
- }
- /*
- #include <stdio.h>
- int n = 9;
- ///////////////////////////////////////////////////////////////////
- struct Ctt
- {
- int t1;
- int t2;
- Ctt()
- {
- t1 = 10;
- t2 = 33;
- }
- int sum();
- ~Ctt()
- {
- printf("Destructor\n");
- }
- };
- ////////////////////////////////////////////////////////////////////////
- int main() //
- {
- Ctt tt;
- // tt.t1 = 10;
- // tt.t2 = 33;
- printf("tt.sum = %d\n", tt.sum() );
- }
- ////////////////////////////////////////////////////////////
- int Ctt::sum() //
- {
- return t1 + t2;
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement