C Output Prediction Easy +10 XP
Printf Format
What does this print?
CRead-only
int x = 42;
printf("%d\n", x);What is the output?
Show answer and explanation
Answer: 42
%d is the format specifier for integers. printf replaces it with the value of x.
Hint: %d formats integers.
What this challenge tests
Output Prediction in C: printf, basics.