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 a pragma?
What is wrong in this statement? scanf(ā%dā,whatnumber);
Why does everyone say not to use scanf? What should I use instead?
Write the program that calculates and prints the average of several integers. Assume that the last value read is sentinel 9999.
What is table lookup in c?
What is the general form of a C program?
What are the difference between a free-standing and a hosted environment?
How can I manipulate strings of multibyte characters?
What is use of #include in c?
Why malloc is faster than calloc?
Why do we need volatile in c?
What is advantage of pointer in c?
What is self-referential structure in c programming?
Explain how many levels deep can include files be nested?
What are dangling pointers? How are dangling pointers different from memory leaks?