小编ano*_*ous的帖子

Unexpected behaviour of printf function in c

I recently encountered with an interview question. I did not understand the behaviour of printf function in this case

 #include <stdio.h>
 int main() {
 int k = printf("String");
 printf("%d",k);
 }
Run Code Online (Sandbox Code Playgroud)

Expected result : Compilation Error

Output : String6

Why is the output String6?

c printf

0
推荐指数
1
解决办法
53
查看次数

标签 统计

c ×1

printf ×1