Predict output of the following program.
#include <stdio.h>int main(){printf(“new_c_questionby”);printf(“placewit”);getchar();return 0;}
A) ew_c_question
placewit
B)new_c_questionby
placewit
C) placewit
D) Depends on terminal configuration
Solution: D is correct
The characters will get sent just like that to the underlying output device (in your case probably a terminal emulator).It is up to the terminal’s implementation then how those characters get actually displayed. For example, a bell (\a) could trigger a beep sound on some terminals, a flash of the screen on others, or it will be completely ignored. It all depends on how the terminal is configured.