Write a main() program that calls this function at least 10
times. Try implementing this function in two different
ways. First, use an external variable to store the count.
Second, use a local variable. Which is more appropriate?

Answer Posted / banavathvishnu

main()
{
static int i;
while(i<10)
{
i++;
main();
}

}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you tell whether two strings are the same?

817


How will you divide two numbers in a MACRO?

692


How can I read/write structures from/to data files?

540


Who developed c language and when?

571


Why is C language being considered a middle level language?

640






Device an algorithm for weiler-atherton polygon clipping, where the clipping window can be any specified polygon

5454


Is it acceptable to declare/define a variable in a c header?

675


Why is c still so popular?

603


What are extern variables in c?

537


How can I automatically locate a programs configuration files in the same directory as the executable?

616


Explain main function in c?

614


When reallocating memory if any other pointers point into the same piece of memory do you have to readjust these other pointers or do they get readjusted automatically?

797


What are linker error?

606


What is the difference between near, far and huge pointers?

622


What is the difference between text and binary i/o?

581