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

Can static variables be declared in a header file?

619


Why is c so powerful?

688


What is a program flowchart and how does it help in writing a program?

666


How many levels of pointers can you have?

706


how we can make 3d venturing graphics on outer interface

4013






What does d mean?

587


Write a program to generate a pulse width frequency of your choise,which can be variable by using the digital port of your processor

2986


How can I dynamically allocate arrays?

595


What is the use of function in c?

715


What is c language and why we use it?

625


hai iam working in sap sd module for one year and working in lumax ind ltd in desp department but my problem is i have done m.b.a in hr/marketing and working sap sd there is any combination it. can you give right solution of my problem. and what can i do?

1666


What is far pointer in c?

814


What is array of pointers to string?

571


Explain how do you declare an array that will hold more than 64kb of data?

905


What is int main () in c?

628