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?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / anbu sankar
Always i value is zero.
This program comes under recusive concept.
In stack memory,always remaining statement address [(i.e)
after main]is stored.
so at one stage stack is filled by addresses. so
Segmentation falut...
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / 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 |
progrem to generate the following series 1 12 123 1234 12345
in C-programming language without using printf statement can we get output r not ? if yes how and if no also how ?
What does == mean in texting?
how to swap two nubers by using a function with pointers?
What is c language & why it is used?
Tell me a C program to display the following Output? 1 1 1 1 1 2 2 2 2 3 3 3 4 4 5
i have to apply for the rbi for the post of officers. i need to know abt the entrance questions whether it may be aps or techinical....
find the size of structure without using the size of function
What is pragma c?
What is the purpose of the statement: strcat (S2, S1)?
Is it valid to address one element beyond the end of an array?
what is the disadvantage of using macros?