fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main(void) {
  5. int ********massive, n=10;
  6. massive = (int ********)malloc(n*sizeof(int *******));
  7. for (int i=0;i<n;i++) {
  8. massive[i]=(int *******)malloc(n*sizeof(int ******));
  9. for(int j=0;j<n;j++){
  10. massive[i][j]=(int ******)malloc(n*sizeof(int *****));
  11. for(int k=0;k<n;k++){
  12. massive[i][j][k]=(int *****)malloc(n*sizeof(int ****));
  13. for (int l=0;l<n;l++) {
  14. massive[i][j][k][l]=(int ****)malloc(n*sizeof(int ***));
  15. for(int m=0;m<n;m++){
  16. massive[i][j][k][l][m]=(int ***)malloc(n*sizeof(int **));
  17. for(int o=0;o<n;o++){
  18. massive[i][j][k][l][m][o]=(int **)malloc(n*sizeof(int *));
  19. for(int p=0;p<n;p++){
  20. massive[i][j][k][l][m][o][p]=(int *)malloc(n*sizeof(int));}}}}}}}
  21.  
  22. massive[1][1][1][1][1][1][1][1] = 5;
  23. massive[7][7][7][7][7][7][7][7] = 10;
  24.  
  25. printf("%d %d\n", massive[1][1][1][1][1][1][1][1], massive[7][7][7][7][7][7][7][7]);
  26.  
  27. return 0;
  28. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘main’:
prog.c:7:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
     for (int i=0;i<n;i++) {
     ^
prog.c:7:5: note: use option -std=c99 or -std=gnu99 to compile your code
prog.c:9:9: error: ‘for’ loop initial declarations are only allowed in C99 mode
         for(int j=0;j<n;j++){
         ^
prog.c:11:13: error: ‘for’ loop initial declarations are only allowed in C99 mode
             for(int k=0;k<n;k++){
             ^
prog.c:13:17: error: ‘for’ loop initial declarations are only allowed in C99 mode
                 for (int l=0;l<n;l++) {
                 ^
prog.c:15:21: error: ‘for’ loop initial declarations are only allowed in C99 mode
                     for(int m=0;m<n;m++){
                     ^
prog.c:17:25: error: ‘for’ loop initial declarations are only allowed in C99 mode
                         for(int o=0;o<n;o++){
                         ^
prog.c:19:29: error: ‘for’ loop initial declarations are only allowed in C99 mode
                             for(int p=0;p<n;p++){
                             ^
stdout
Standard output is empty