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 are the advantages of Macro over function?
Is that possible to add pointers to each other?
What is a dynamic array in c?
Draw a diagram showing how the operating system relates to users, application programs, and the computer hardware ?
What is the right type to use for boolean values in c? Is there a standard type? Should I use #defines or enums for the true and false values?
HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????
What the advantages of using Unions?
Is a house a shell structure?
How do you define structure?
Is c compiled or interpreted?
What is huge pointer in c?
where are auto variables stored? What are the characteristics of an auto variable?
How can I split up a string into whitespace-separated fields?
What is the use of header files?
What is the right way to use errno?