c code output

radha gogia

radha gogia

@radha-BTDzli Oct 25, 2024
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
printf("\nab");
printf("\bsi");
printf("\rha");
getch();
}

According to me the op should be "hai",but the output is
absi
ha
So ,plz tell how is it actually displaying this output

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • Suhel Inamdar

    Suhel Inamdar

    @suhel-vtZfAe Oct 10, 2014

    No yrr.. I compile this code.. its o/p is hai....
  • radha gogia

    radha gogia

    @radha-BTDzli Oct 10, 2014

    Suhel143
    No yrr.. I compile this code.. its o/p is hai....
    see this is a compiler dependent code ,try some online compiler,u will get a different answer,becoz \b and \r work differently depending on the complier