When does printf fail to print?

后端 未结 5 1957
梦谈多话
梦谈多话 2020-12-17 10:42

printf function in c doesn\'t always print the output on screen. For example if you forget to put \\n at the end of string you are printfing you sometimes don\'t get the o/p

5条回答
  •  借酒劲吻你
    2020-12-17 11:14

    I used

    puts(largeString); 
    

    because in my particular case, printf() just stopped printing halfway through. The entire string was there, it just didn't print.

    fflush(stdout) didn't fix it either, another printf() on the next line printed just fine.

提交回复
热议问题