Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.53 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <assert.h>
  4. #include <time.h>
  5.  
  6. int main()
  7. {
  8.     srand(time(NULL));
  9.  
  10.     int size = rand() % 50;
  11.     int **********array;
  12.    
  13.     array = malloc(size * sizeof(int*********));
  14.    
  15.     for (int a = 0; a < size; ++a) {
  16.       array[a] = malloc(size * sizeof(int********));
  17.      
  18.       for (int b = 0; b < size; ++b) {
  19.         array[a][b] = malloc(size * sizeof(int*******));
  20.        
  21.         for (int c = 0; c < size; ++c) {
  22.           array[a][b][c] = malloc(size * sizeof(int******));
  23.          
  24.           for (int d = 0; d < size; ++d) {
  25.             array[a][b][c][d] = malloc(size * sizeof(int*****));
  26.          
  27.             for (int e = 0; e < size; ++e) {
  28.               array[a][b][c][d][e] = malloc(size * sizeof(int****));
  29.            
  30.               for (int f = 0; f < size; ++f) {
  31.                 array[a][b][c][d][e][f] = malloc(size * sizeof(int***));
  32.              
  33.                 for (int g = 0; g < size; ++g) {
  34.                   array[a][b][c][d][e][f][g] = malloc(size * sizeof(int**));
  35.                
  36.                   for (int k = 0; k < size; ++k) {
  37.                     array[a][b][c][d][e][f][g][k] = malloc(size * sizeof(int*));
  38.                    
  39.                     for (int l = 0; l < size; ++l) {
  40.                       array[a][b][c][d][e][f][g][k][l] = malloc(size);
  41.                      
  42.                     }
  43.                   }
  44.                 }
  45.               }
  46.             }
  47.           }
  48.         }
  49.       }
  50.     }
  51.    
  52.     return 0;
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement