Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Predict the output
/
C++
/
C fundamentals
What does this program print?
from C fundamentals
C23 (GCC 13.3.0)
beginner
2 min
What does this program print?
C
Copy
#include
<stdio.h>
int
main
(
void
) {
printf(
"
%d
%.1f
\n"
,
7
/
2
,
7
/
2.0
)
;
return
0
;
}
3 3.5
3.5 3.5
3 3.0
The program has undefined behavior.
Check
Copy code
Open in playground
Ask AI about this kata
Report an error
previous kata
Which statement about sizeof(char) is portable C?
Quiz
next kata
Review generated reading average
Review AI code
A new version is available
Reload