|
|
|
|
|
by bremac
5358 days ago
|
|
printf prints to standard output, which is line-buffered by default when reading from a tty on UNIX variants. This can lead to strange problems for those who try to use it to track which parts of a program are being executed, as demonstrated by the following program with an infinite loop: #include <stdio.h>
int main(int c, char **v) {
printf("Hello\nJello");
while(1) ;
return 0;
}
|
|
Also, using printf() for debugging? In 2011? I seriously hope you guys don't do this.