Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- char ***lists=(char ***)malloc( 2*sizeof(char **) );
- *(lists+0)=(char **)malloc(3*sizeof(char *));
- *(*(lists+0)+0)="ola";
- *(*(lists+0)+1)="Yay";
- *(*(lists+0)+2)="lol";
- lists[0][3]=(char *)realloc(lists[0],4*sizeof(char *));
- *(*(lists+0)+3)="iai";
- *(lists+1)=(char **)malloc(3*sizeof(char *));
- *(*(lists+1)+0)="epic";
- *(*(lists+1)+1)="let";
- *(*(lists+1)+2)="omg";
- fprintf(stdout," %s \n %s \n %c\n",lists[0][2],lists[1][0],lists[0][0][1]);
- free(lists[0]);
- free(lists[1]);
- free(lists);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment