Guest User

Untitled

a guest
Jan 16th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. void application()
  2. {
  3. int randSize, i;
  4.  
  5. srand((unsigned)time(NULL));
  6. randSize = (rand() % 15);
  7.  
  8. char array[randSize];
  9. char *bar = array;
  10.  
  11. for(i=0; i< randSize; i++)
  12. array[i] = 'x';
  13.  
  14. printf("%s | ", bar);
  15. }
  16.  
  17. char array[randSize + 1];
  18.  
  19. // loop to fill the array
  20.  
  21. array[i] = '';
  22.  
  23. printf("%s | ", bar);
  24.  
  25. char array[randSize + 1];
  26. for (i=0; i < randSize; i++)
  27. array[i] = 'x';
  28. array[i] = '';
  29.  
  30. char array[randSize];
  31.  
  32. char *array = malloc(randSize);
Add Comment
Please, Sign In to add comment