fork download
  1. #include <stdio.h>
  2. char generateJunk(int length) {
  3. char *junk = malloc(length * sizeof(char));
  4. for (int i; i < length; i++) {
  5. int *ptr = &junk+(i * sizeof(char));
  6. printf("%d\n",ptr);
  7. *ptr = 1;
  8. }
  9. return *junk;
  10. }
  11. int main(void) {
  12. // your code goes here
  13. generateJunk(255);
  14. char string[255];
  15. scanf("%255c", string);
  16. printf("%s", string);
  17. return 0;
  18. }
  19.  
Runtime error #stdin #stdout 0s 9424KB
stdin
Standard input is empty
stdout
Standard output is empty