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
Are the variables argc and argv are always local to main?
What oops means?
What is array within structure?
Write a code on reverse string and its complexity.
What is a pragma?
Explain a pre-processor and its advantages.
find out largest elemant of diagonalmatrix
What is atoi and atof in c?
What is the use of volatile?
How do I use void main?
What is bss in c?
What are qualifiers and modifiers c?
Are there namespaces in c?
What is the difference between arrays and pointers?
What is the difference between the = symbol and == symbol?