functions calling functions calling yooooooou

Hi

when a function calls another function i.e

Asteroids (bool *newAsteroidFlag,) {
  if (newAsteroidFlag == true) {
    asteroidCnt++;
    DEBUG = asteroidGen(asteroidCnt, &buffer1, decimal_X, uint8_t decimal_Y);
    newAsteroidFlag = false;
  } else {
    
  }

Do I need to include the arguments of the child function in the parent function?

i.e for the above function

Asteroids (bool *newAsteroidFlag, asteroidCnt, &buffer1, decimal_X, uint8_t decimal_Y) {
  if (newAsteroidFlag == true) {
    asteroidCnt++;
    DEBUG = asteroidGen(asteroidCnt, &buffer1, decimal_X, uint8_t decimal_Y);
    newAsteroidFlag = false;
  } else {
    
  }

Hope this makes sense and is not a stupid question? If they are both OK to use and work. Is there any best practice and why?

Thanks C Major Novice

It depends on what types of variables those are and what scope they have. If they're global variables that all functions have access to then there's no reason to pass any of them anywhere. If they're things that the first function has access to and can get to call the inner function then it doesn't need to have them passed to it. If the things you are passing are scoped such that the outer function can't get to them then you do need to pass them through.

In short, you should post complete code. It is impossible to answer your question specifically without it.