fork(2) download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main(void) {
  5. char* a = malloc(sizeof(char)*5);
  6. char* temp[] = {a};
  7. int i, h, k = 'a';
  8.  
  9. for(i = 0; i < 5; i++)
  10. a[i] = k++;
  11.  
  12. for(i = 0; i < 5; i++)
  13. printf("%c ", temp[0][i]);
  14.  
  15. free(a);
  16. return 0;
  17. }
Success #stdin #stdout 0s 2424KB
stdin
Standard input is empty
stdout
a b c d e