CrazyEngineers
  • c code output

    radha gogia

    Member

    Updated: Oct 25, 2024
    Views: 1.2K
    #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
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • Suhel Inamdar

    MemberOct 10, 2014

    No yrr.. I compile this code.. its o/p is hai....
    Are you sure? This action cannot be undone.
    Cancel
  • radha gogia

    MemberOct 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
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register