Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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?

Answers were Sorted based on User's Feedback



Write a main() program that calls this function at least 10 times. Try implementing this function ..

Answer / banavathvishnu

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

}

Is This Answer Correct ?    1 Yes 0 No

Write a main() program that calls this function at least 10 times. Try implementing this function ..

Answer / satya

why not we use if instead of while in the above answer...

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

Write a function that accepts a sentence as a parameter, and returns the same with each of its words reversed. The returned sentence should have 1 blank space between each pair of words. Demonstrate the usage of this function from a main program. Example: Parameter: “jack and jill went up a hill” Return Value: “kcaj dna llij tnew pu a llih”

5 Answers   Mind Tree,


What does the c preprocessor do?

0 Answers  


What are the uses of null pointers?

0 Answers  


How we can insert comments in a c program?

0 Answers  


Is flag a keyword in c?

0 Answers  


What is a void * in c?

0 Answers  


What is the main differences between C and Embedded C?

9 Answers  


who is the founder of c

19 Answers   College School Exams Tests, HP,


how can i get output like this? 1 2 3 4 5 6

6 Answers   Excel,


main() { printf("\n %d %d %d",sizeof('3'),sizeof("3"),sizeof(3)); }

6 Answers  


Why use int main instead of void main?

0 Answers  


What is time null in c?

0 Answers  


Categories