Q. Determine the Final Output
Code:void main()
{
printf("\nab");
printf("\bsi");
printf("\rha");
}
β
Correct Answer: (D)
hai
Explanation: \n - newline - printf("\nab"); - Prints ab
\b - backspace - printf("\bsi"); - firstly '\b' removes 'b' from 'ab ' and then prints 'si'. So after execution of printf
\b - backspace - printf("\bsi"); - firstly '\b' removes 'b' from 'ab ' and then prints 'si'. So after execution of printf