Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- void foo(int *p);
- ////////////////////////////////////////////
- int main() //
- {
- int n = 44;
- int *p = &n;
- int nArr[99] = {100, 101, 102, 103};
- foo(nArr);
- }
- /////////////////////////////////////////////
- void foo(int *p) //
- {
- for(int i = 0; i <= 4; i++)
- {
- printf("%d, ", p[i] );
- }
- }
- /*
- #include <stdio.h>
- ////////////////////////////////////////////
- int main() //
- {
- int n = 44;
- int *p = &n;
- int nArr[99] = {100, 101, 102, 103};
- for(int i = 0; i <= 4; i++)
- {
- printf("%d, ", nArr[i] );
- }
- }
- */
- /*
- #include <stdio.h>
- ////////////////////////////////////////////
- int main() //
- {
- int n = 44;
- int *p = &n;
- printf("size of int = %d\n", sizeof(int));
- printf(" p = %d\n", p );
- printf(" p = %d\n", &(*(&(*p))));
- }
- */
- /*
- #include <stdio.h>
- ////////////////////////////////////////////
- int main() //
- {
- int n = 71;
- int *p = &n;
- printf("size of int = %d\n", sizeof(int));
- printf("p = %d\n", p);
- }
- */
- /*
- #include <stdio.h>
- void mult(int i);
- ////////////////////////////////////////////
- int main() //
- {
- int i = 1;
- printf("address i = %d\n", &i);
- for(; i < 11; i++) mult(i);
- return 0;
- }
- /////////////////////////////////////////////////
- void mult(int i) //
- {
- if(i == 1) printf("address i = %d\n", &i);
- int j;
- for(j = 2; j < 10; j++)
- {
- printf("%2d * %2d = %d\n", i, j, i*j);
- }
- printf(" - - - - - - - - \n");
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement