Dynamically called program stays in memory

Dynamically called program stays in memory Would dynamically called program stay in memory? I have a doubt if the dynamically called program would stay in main memory after the control returns to calling program or not. Lets say a Program A calls program B and after the call the control isĀ  back in pgm A, would the program B stay in the main memory or will “; ; ; ;