• This topic is empty.
Viewing 1 post (of 1 total)
  • Author
  • #61

      Reproducing part of Lecture 1 below:

      “We can even change our meow function to take in some input, n, and meow n times:

      #include <stdio.h>
      void meow(int n);
      int main(void)
      void meow(int n)
          for (int i = 0; i < n; i++)

      The void before the meow function means that it doesn’t return a value, and likewise in main we can’t do anything with the result of meow, so we just call it.”

      To me, it returns a value, which is “meow\n”. Once meow function called, it is generating an output, which to me returning a value. I know I am perhaps unable to differentiate between calling without value and calling with value. Help appreciated.



    Viewing 1 post (of 1 total)
    • You must be logged in to reply to this topic.
    Scroll to Top