Discussion :: Functions - Find Output of Program (Q.No.21)
|Sneha said: (Sep 2, 2011)|
|What happens when it encounters main again in the program? It doesnt print back the same printf statement?|
|Ivo said: (Jun 3, 2012)|
|"IndiaBIX" is not the same as "IndiaBIx".
@Sneha: It would call main recursively until the stack overflows
|Leszek said: (Jun 9, 2012)|
|Isn't B also correct? Maybe main() COULD call itself, but in this case it doesn't because it never gets to that point.|
|Prerna said: (Aug 9, 2012)|
|What would be the answer if it would have been exit(0) instead of exit(1).|
|Rohit Sharma said: (Sep 2, 2013)|
|Yes main() can call it self but in this program there is exit(1) just before we called the main() function in the main program so it will terminate the program execution before calling main() function again :).|
|Rohit said: (Oct 4, 2013)|
|Elaborate exit(0) and exit(1)?|
|Prattj said: (Dec 5, 2013)|
|exit(0)=>causes the program to exit with a successful termination.
exit(1)=>causes the program to exit with a system-specific meaning.
On many systems, exit(1) signals some sort of failure, however there is no guarantee.
|Satakshi said: (Dec 4, 2014)|
|What will happen if in this prog there will exit(0) instead of exist(1)?|
|Dimple said: (Mar 16, 2015)|
|exit(0) is a successful termination of a program.|
|Tamilmaran C said: (Jun 24, 2015)|
|It acceptable answer D:
|Somya said: (Dec 14, 2016)|
|Can anybody Explain "exit"?|
Post your comments here:
Email : (optional)
» Your comments will be displayed only after manual approval.