Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- void foo(int*);
- ////////////////////////////////////////////////////////
- int main()
- {
- int n = 77;
- printf(" n = %d\n ", n );
- printf("address n = %d\n\n", &n );
- foo(&n);
- printf(" n = %d\n", n );
- printf("address n = %d\n", &n );
- }
- /////////////////////////////////////////////////////
- void foo(int *p)
- {
- *p = *p - 20;
- printf(" n2 = %d\n ", *p );
- printf("address n2 = %d\n\n", p );
- }
- /*
- #include <stdio.h>
- void foo(int);
- ////////////////////////////////////////////////////////
- int main()
- {
- int n = 77;
- printf(" n = %d\n ", n );
- printf("address n = %d\n\n", &n );
- foo(n);
- printf(" n = %d\n", n );
- printf("address n = %d\n", &n );
- }
- /////////////////////////////////////////////////////
- void foo(int n2)
- {
- n2 = n2 - 20;
- printf(" n2 = %d\n ", n2 );
- printf("address n2 = %d\n\n", &n2 );
- }
- */
- /*
- #include <stdio.h>
- namespace Sobolev
- {
- int foo()
- {
- return 3 + 2;
- }
- int n = 77;
- }
- using namespace Sobolev;
- ////////////////////////////////////////////////////////
- int main()
- {
- printf("n = %d\n", Sobolev::n ); Sobolev::n = Sobolev::foo();
- printf("n = %d\n", Sobolev::n );
- }
- */
- //
- /*
- #include <stdio.h>
- namespace Sobolev
- {
- int n = 77;
- }
- ////////////////////////////////////////////////////////
- int main()
- {
- int n = 333;
- printf("size of int %d\n", sizeof(int) );
- printf(" n = %d\n", n );
- printf("address n = %d\n", &n );
- printf(" n = %d\n", Sobolev::n );
- }
- */
- /*
- #include <stdio.h>
- int n = 77;
- int main()
- {
- printf("size of int %d\n", sizeof(int) );
- printf(" n = %d\n", n );
- printf("address n = %d\n", &n );
- }
- */
- /*
- #define _CRT_SECURE_NO_WARNINGS
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- int a = 93;
- if(a == 6) { printf("%s\n", "apple" ); goto L_01; }
- if(a == 7) { printf("%s\n", "orange"); goto L_01; }
- if(a == 8)
- {
- printf("%s\n", "mango");
- goto L_01;
- }
- if(a == 9)
- {
- printf("%s\n", "kiwi");
- goto L_01;
- }
- printf("%s\n", "error");
- L_01:
- return 0;
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement