Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <time.h>
- #include <stdlib.h>
- void foo(int *, int *cvbcvbcv);
- ///////////////////////////////////////////////////////
- int main() //
- {
- srand(time(0));
- int nArr[15] = {1, 22, 33, 44, 55, 66, 77, 88};
- int nA_2[15];
- nArr[14] = 12;
- for(int i = 0; i < 20; i++)
- {
- nA_2[i] = rand() %200;
- }
- printf("nArr = %d\n", nArr);
- foo(&nArr[0], &nA_2[0]);
- }
- ///////////////////////////////////////////////////////
- void foo(int *p, int *p2) //
- {
- for(int i = -5; i < 20; i++)
- {
- printf("%3d, ", p [i]);
- printf("%3d\n", p2[i]);
- }
- }
- /*
- #include <stdio.h>
- #include <time.h>
- #include <stdlib.h>
- void foo(int *p);
- ///////////////////////////////////////////////////////
- int main() //
- {
- srand(time(0));
- int nArr[15] = {1, 22, 33, 44, 55, 66, 77, 88};
- int nA_2[15];
- printf("nArr = %d\n", nArr);
- foo(&nArr[0]);
- }
- ///////////////////////////////////////////////////////
- void foo(int *p)
- {
- for(int i = 0; i < 20; i++)
- {
- printf("%d\n", &p[i]);
- }
- }
- */
- /*
- #include <stdio.h>
- ///////////////////////////////////////////////////////
- int main() //
- {
- int a, b;
- for(a = 1; a <= 10; a ++ )
- {
- b = 7 * a;
- printf ("7 * %2d = %2d\n", a, b);
- }
- printf (" - - - - - - - - \n");
- return 0;
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement