Active Topics Memberlist Calendar Search Help | |
Register Login |
One Stop GATE Forum : GATE AT A GLANCE : Correspondence Courses |
Topic: can we call 'main' function recursively? | |
Author | Message |
Vijay007
Newbie Joined: 02Feb2007 Online Status: Offline Posts: 19 |
Topic: can we call 'main' function recursively? Posted: 02Feb2007 at 5:21pm |
Hi,
This id regarding two level-1 questions gven in Data Sttructures and and algorithms correspondence material. Q 34 and Q 36 Q34] main() {printf("GATE"); main(); } And answer is Compiler error Q36] main() { statuc int a=3; printf("%d",a--); if (a) main(); } Answer given is 3 2 1 Anyone can you explain? JAI HIND Post Resume: Click here to Upload your Resume & Apply for Jobs |
|
IP Logged | |
balu
Senior Member Joined: 20Feb2007 Online Status: Offline Posts: 236 |
Posted: 23Feb2007 at 6:24pm |
main() is used once in a function.....
|
|
IP Logged | |
Forum Jump |
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
|
© Vyom Technosoft Pvt. Ltd. All Rights Reserved.