fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main(void) {
  5. char *letter;
  6. int c = 0, x = 26;
  7.  
  8. letter = malloc(x + 1); /* for the NUL terminator */
  9. if (!letter) exit(EXIT_FAILURE);
  10. for (; c < x; c++) {
  11. letter[c] = 'A' + c; /* fails in EBCDIC computers */
  12. }
  13. letter[c] = 0;
  14. printf("%s\n", letter);
  15. free(letter);
  16. return 0;
  17. }
Success #stdin #stdout 0.02s 1852KB
stdin
Standard input is empty
stdout
ABCDEFGHIJKLMNOPQRSTUVWXYZ