Technical Interview Questions And Answers

057. Technical interview question: Give the output of following code

By April 26, 2018 No Comments
  1. int i;
  2. int fun();
  3. int main()
  4. {
  5. while(i)
  6. {
  7. fun();
  8. main();
  9. }
  10. printf("Hello\n");
  11. return 0;
  12. }
  13. int fun()
  14. {
  15. printf("Hi");
  16. }
int i;
int fun();
int main()
{
    while(i)
    {
        fun();
        main();
    }
    printf("Hello\n");
    return 0;
}
int fun()
{
    printf("Hi");
}
Watch video explanation for this technical question

Leave a Reply

DEMO01