0_0_37683732_29733.cpp: In function 'int main()': 0_0_37683732_29733.cpp:15:38: error: operands to ?: have different types 'char' and 'const char*' printf("%d%c",sum[i],i==n?'\n':" "); ^