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 / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is zero based addressing?

717


What is the difference between variable declaration and variable definition in c?

565


write a program in C that prompts the user for today's date,tomorrow's date and display the results.Use structures for today's date,tomorrow's date and an array to hold the days for each month of the year.

4991


List the different types of c tokens?

629


Write a function expand(s1,s2) that expands shorthand notations like a-z in the string s1 into the equivalent complete list abc...xyz in s2 . Allow for letters of either case and digits, and be prepared to handle cases like a-b-c and a-z0-9 and -a-z. z-a:zyx......ba -1-6-:-123456- 1-9-1:123456789987654321 a-R-L:a-R...L a-b-c:abbc

5057






Are global variables static in c?

677


What is %d called in c?

761


When should you use a type cast?

593


How do you write a program which produces its own source code as output?

608


what are # pragma staments?

1631


Explain what is wrong with this program statement? Void = 10;

766


What is C language ?

1530


What is variable and explain rules to declare variable in c?

556


Explain the difference between malloc() and calloc() function?

603


The process of repeatedly running a set of computer instructions until some condition is specifed a) condition b) sequential condition c) global d) iteration

636