can v write main()
{
main();
}
Is it true?

Answers were Sorted based on User's Feedback



can v write main() { main(); } Is it true?..

Answer / manish soni bca 3rd year jaipu

it is recursive function.
here is no condition is apply so
the result is
infintely.
and after that 'the statck memory flow'.
conditio is start.


manish soni tagore bio tech collage,
jaipur

Is This Answer Correct ?    2 Yes 0 No

can v write main() { main(); } Is it true?..

Answer / satya

k.. but what is the result.. i want some explanation... is
not it be recurssive..

Is This Answer Correct ?    2 Yes 1 No

can v write main() { main(); } Is it true?..

Answer / sharath

yes we can write

Is This Answer Correct ?    5 Yes 5 No

can v write main() { main(); } Is it true?..

Answer / sharath

yes it becomes a recursive function
we have to specify any condition using a loop or any decision block so that the loop doesnot call the main() function again.

Is This Answer Correct ?    1 Yes 1 No

can v write main() { main(); } Is it true?..

Answer / sharath

what do you think as you oppposed the answer
can you please explain it
please..

Is This Answer Correct ?    0 Yes 0 No

can v write main() { main(); } Is it true?..

Answer / sharath

yes u are right
there is no condition and the result is an infinite loop which continues till the stack overflow after that it may hang..

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

Explain why C language is procedural?

0 Answers   GE,


Why data types in all programming languages have some range? Why ritche have disigned first time likethat?Why not a single data type can support all other types?

2 Answers   Excel,


tell me the full form of c?

2 Answers  


Write a program to give following output..... ********* **** **** *** *** ** ** * * ** ** *** *** **** **** *********

4 Answers  


Is a house a shell structure?

0 Answers  






what are bps & baud rates? differentiate these two?

2 Answers   TCS,


34.what are bitwise shift operators? 35.what are bit fields? What is the use of bit fields in a structure declaration? 36.what is the size of an integer variable? 37.what are the files which are automatically opened when a c file is executed? 38.what is the little endian and big endian? 39.what is the use of fflush() function? 40.what is the difference between exit() and _exit() functions? 41.where does malloc() function get the memory? 42.what is the difference between malloc() and calloc() function? 43.what is the difference between postfix and prefix unary increment operators?

0 Answers  


what is the maximum no. of bytes calloc can allocate

4 Answers   Mphasis,


Which control loop is recommended if you have to execute set of statements for fixed number of times?

0 Answers  


Explain a pre-processor and its advantages.

0 Answers  


Why we use void main in c?

0 Answers  


How can I sort more data than will fit in memory?

0 Answers  


Categories