Advertisement
Guest User

Untitled

a guest
Jan 28th, 2020
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.40 KB | None | 0 0
  1. #include <stdlib.h>
  2. #include <stdio.h>
  3. int main(void)
  4. {
  5.     size_t NNUMBERS = 50000;
  6.     char **arr=calloc(NNUMBERS,sizeof(char *));
  7.     if(arr==NULL)
  8.     {
  9.         exit(EXIT_FAILURE);
  10.     }
  11.     for(size_t i=0;i<NNUMBERS;i++)
  12.     {
  13.         *(arr+i)=calloc(3,sizeof(char));
  14.         if(*(arr+i)==NULL)
  15.         {
  16.             exit(EXIT_FAILURE);
  17.         }
  18.     }
  19.     char *number0=arr[0];
  20.     number0[0]='h';
  21.     number0[1]='i';
  22.     printf("%s\n",number0);
  23.     return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement