Logo 
Search:

C Programming FAQ

Submit Interview FAQ
Home » Interview FAQ » C ProgrammingRSS Feeds

C programming practical question 59

  Shared By: Adah Miller    Date: Jan 24    Category: C Programming    Views: 70

Answer:

main()
{
main();
}


Answer:
Runtime error : Stack overflow.


Explanation:
main function calls itself again and again. Each time the function is called its return address is stored in the call stack. Since there is no condition to terminate the function call, the call stack overflows at runtime. So it terminates the program and results in an error.


Share: 
 

Didn't find what you were looking for? Find more on C programming practical question 59 Or get search suggestion and latest updates.


Your Comment
  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].


Tagged: