what is the output and why?

accoolaryan

accoolaryan

@accoolaryan-BYyoWn Oct 25, 2024
😕
int main()
{
int fun();
printf("%d",fun());
getch();
return 0;
}
fun(){
return 011;
}

Replies

Welcome, guest

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

CrazyEngineers powered by Jatra Community Platform

  • rama_krish627

    rama_krish627

    @rama-krish627-LuiiO6 Nov 29, 2009

    The output is 9 why because 011 is in octal it's equivalant decimal is 9.
    Octal numbers are followed by 0.