0 0 votes What will be the return value of the below function, if it is called a sample(4)? int sample(int x){ if( x == 0 || x ==2) return 1; return (sample(--x) * (x--)); } Programming in C programming-in-c recursion bad-question + – abhinowKatore 1.2k views answer comment Share Follow Print See all 7 Comments 7 7 Comments reply Show 4 previous comments abhinowKatore commented Dec 5, 2022 reply Follow flag Hello @DebSujit please check you Linkdin message section ! 1 1 replyShare gatecse commented Dec 5, 2022 reply Follow flag @DebSujit it is compiler dependent but not compiler defined. So you cannot guarantee that gcc will always give the same result. Such codes are not meant to be written by half a decent programmer and similarly won't be asked in any good exams except may be to check undefined behaviour knowledge. 3 3 replyShare DebRC commented Dec 6, 2022 reply Follow flag @gatecse Ah correct! Got it sir. 1 1 replyShare Please log in or register to add a comment.