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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;

612


How many levels of indirection in pointers can you have in a single declaration?

596


How do you list files in a directory?

563


Is there any possibility to create customized header file with c programming language?

627


Is that possible to add pointers to each other?

905






Does c have function or method?

592


An organised method of depicting the use of an area of computer memory used to signify the uses for different parts of the memory a) swap b) extended memory c) memory map d) all of the above

708


we need to calculating INCOME TAX for the person. The INCOME TAX is as follows:- First $10000/- of income : 4% tax Next $10000/- of income : 8% tax Next $10000/- of income : 11.5% tax above $10, 00,00/- : 15% tax What is the Solution of this Question ?

804


What is difference between constant pointer and constant variable?

630


Do you know the use of 'auto' keyword?

662


What is huge pointer in c?

586


Explain how can I make sure that my program is the only one accessing a file?

629


What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?

626


What is the correct code to have following output in c using nested for loop?

613


What is malloc() function?

638