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?
Answers were Sorted based on User's Feedback
Answer / sai
The given program is an infinite loop with no
output.Because it calls main() function with in the for
loop.
So the value of the i always '0' only.According to the for
loop condition the execution of the program goes false only
i>=10.Then when the condition in the for loop goes to false?
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / 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 |
Answer / kalyan chukka
Loop will Repeated 10 times .in this program main function
is called it self 10 times.So the loop will repeated 10 times
| Is This Answer Correct ? | 1 Yes | 4 No |
what is data structure.in linear and non linear data structures which one is better?Explain
What is a const pointer?
Write a c program to build a heap method using Pointer to function and pointer to structure ?
0 Answers MAHINDRA, Protech, Sivan Tech,
What is methods in c?
. A database table called PERSON contains the fields NAME, BASIC and HRA. Write a computer program to print a report which employee name and total salary for those employees whose total salary is more than 10,000. Total Salary = BASIC + HRA. At the end, the program should also print the total number of employees whose total salary is more than 10,000.
Can you think of a way when a program crashed before reaching main? If yes how?
how to estimate the disk access time? e.g. the time between read one byte and another byte in the disk.
YBJBU6
what is the difference between entry control and exit control statement?
12 Answers Darbari Lal DAV Model School,
int *a[5] refers to
What are the two types of structure?
What is null pointer in c?