fork(2) download
  1. #include <stdio.h>
  2.  
  3. #define MAKE_WORD(x,y) x,y
  4. #define MAKE_STR(...) ((char[]){__VA_ARGS__, 0})
  5.  
  6. const char *vec = MAKE_STR(MAKE_WORD(1,2), MAKE_WORD(3, 4), MAKE_WORD(5, 6));
  7.  
  8. int main(void) {
  9. fputs("vec is: ", stdout);
  10. for (int i = 0; i < 6; ++i) printf("\\x%02X", vec[i]);
  11. putchar('\n');
  12. return 0;
  13. }
  14.  
Success #stdin #stdout 0s 2156KB
stdin
Standard input is empty
stdout
vec is: \x01\x02\x03\x04\x05\x06