Please do not confuse in ternary operators
you can consider the code like this
int f(int a){
if(a>20)
return 10;
else
return 20;
}
int main(){
int b=f(20);
return 0;
}
this code will execute properly and will return 0 because main function is returning 0;
int b=f(20); this statement stores value returned by f()
20 will be returned if in main we write return b;