Cooler_

lol fail

Jun 1st, 2012
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.26 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main()
  5. {
  6.  char **list=(char **)malloc(1*sizeof(char *));
  7.  
  8.  *(list+0)="ola sadcsdasdra";
  9.  list[1]=realloc(list,2*sizeof(char *));
  10.  *(list+1)="lasdol";
  11.  
  12.  puts(list[1]);
  13.  puts(list[0]);
  14.  
  15.  
  16.  free(list);
  17.  return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment