In bar function,val-1 decreases val by 1..so bar 3 calls bar 2..bar 2 calls bar 1..bar 1 calls bar 0..bar 0 means condition(while 0>0) is false therefore return 0..
Now, return 0 ..return statement definition is it should terminate the current function bar 0 and transfer the control to the calling function bar 1 which is while(1>0)...
while(1>0) means infinite loop...so ans is C
Also,In foo function,val-- means post decrement operator.so val is decremented only in the next statement.so foo(val--) means foo3 calls foo3..foo3 calls foo3..foo3 calls foo3 repeatedly causing abnormal termination of the program.
Please go through the previous question(GATE2017-1-35 )for clarity about the return statement..