~/ Return of the function

05 September 2017
#include <stdio.h>

int multiply(int base_number, int multiply_by){
  return base_number * multiply_by;
}

int main(int argc, char *argv[]){

  printf("5x2=%d\n", multiply_by(5, 2));

  return 0;
}

What happens here is pretty simple: Your function returned a number(an int) to the caller(or parent function) which is? main() or printf()?

Well, that’s up to you to answer and as an another question, you gotta figure out the return type of printf(). Does it return anything? If it does, are you aware of any piece of code around that checks the return value of it, ever?

p.s. Title of this post ain’t no coincidence: www.imdb.com/title/tt0345856/