The "correct" output in this case is \nhai\bas\rha\n, exactly as you supplied it to printf, with \n, \b and \r standing for the corresponding special characters (or character combinations).
But how this output will look on a specific output device depends on the properties and capabilities of that device. It just so happens that the output device used (simulated) by your online compiler displays that sequence as haiasha.
It appears that your expectations are based on the behavior of a "typical" display terminal. Meanwhile, online compilers don't output anything directly to any "display". They intercept the standard output and then postprocess it for representation on a Web page. What you see is the result of that postprocessing.
'\n','h','a','i','\b'`, etc (i.e 11 characters), regardless of whether you see all of them on the particular output device.int main(). Justmain()is not valid C anymore.