Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <time.h>
- #include <stdlib.h>
- #define N 10
- void losuj(int *tab)
- {
- srand (time(NULL));
- for (int i=0; i<N; i++)
- {
- *(tab+(sizeof(int)+i))=rand()%10+1;
- }
- }
- void wypisz(int *tab)
- {
- for (int i=0; i<N; i++)
- {
- printf("%d\n",*(tab+(sizeof(int)+i)));
- }
- }
- int main()
- {
- int tab[N];
- int *t=&tab;
- losuj(*t);
- wypisz(*t);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement