2) Study the following program:
main()
{printf("javatpoint");
main(); }
What will be the output of this program?
Answers
Answered by
0
Answer:
RECRUSION OF STACKOVERFLOW
Answered by
0
Given:
main()
{
printf("javatpoint");
main();
}
Output:
The program will keep on printing javatpoint.
Explanation:
Since, in the given program, the main function will call itself again and again (Recursion)
Therefore, javatpoint will print on screen again and again.
A chaining process occurs when a function calls another function. Recursion is a specific case of this process when a function calls itself.
In the given program:
main()
{
printf("javatpoint");
main(); ←Recursive function call
}
Similar questions
English,
2 months ago
Science,
2 months ago
English,
10 months ago
Social Sciences,
10 months ago
English,
10 months ago