Is main() is used in the program,,see below example?
void main()
{
int i;
for(i=0;i<10;i++)
main();
}
Then what is the output of the program?
Answer Posted / anbu sankar
Always i value is zero.
This program comes under recusive concept.
In stack memory,always remaining statement address [(i.e)
after main]is stored.
so at one stage stack is filled by addresses. so
Segmentation falut...
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the use of static variable in c?
Explain heap and queue.
For what purpose null pointer used?
What are the differences between Structures and Arrays?
Explain how do you list files in a directory?
What is an endless loop?
What is 1f in c?
What are register variables? What are the advantage of using register variables?
What is a floating point in c?
Explain what is the benefit of using enum to declare a constant?
Explain how can I open a file so that other programs can update it at the same time?
How is a pointer variable declared?
What is the hardest programming language?
What is switch in c?
What is pragma in c?