fork download
  1. #include <stdio.h>
  2. #define type(x) _Generic((x), \
  3.   int: "int", unsigned int: "unsigned int", \
  4.   float: "float", double: "double", \
  5.   long double: "long double", char *: "char *", \
  6.   void *: "void *", int *: "int *", \
  7.   default: "unknown")
  8. int main(var1, var2, var3, var4, var5) {
  9. printf("%s %s %s %s %s\n", type(var1), type(var2), type(var3), type(var4), type(var5));
  10. printf("%d %d %d %d %d", var1, var2, var3, var4, var5);
  11. return 0;
  12. }
Success #stdin #stdout 0s 5300KB
stdin
Standard input is empty
stdout
int int int int int
1 -186459048 -186459032 -1507429968 -1558422976