Function in C Language - Quiz

  • A void
  • B int
  • C char
  • D Both A and B and C
  • A A function that calls another function
  • B A function that returns a pointer to another function
  • C A function that calls itself
  • D A function that takes no arguments
  • A A recursive function cannot call itself.
  • B A recursive function must have a base case to terminate the recursion.
  • C A recursive function must have a return type of void.
  • D A recursive function cannot be called from another function.
  • A To define the implementation of a function.
  • B To declare the return type of a function.
  • C To declare the function name and its parameter types.
  • D To declare the function name and its return type.
  • A Function arguments are always passed by value.
  • B Function arguments are always passed by reference.
  • C Function arguments can be passed by value or by reference.
  • D Function arguments can be passed by value, bot not by reference
  • A char *
  • B struct
  • C void
  • D none of the mentioned
  • A Call by value passes the address of the argument to the function, while call by reference passes a copy of the argument value.
  • B Call by value passes a copy of the argument value to the function, while call by reference passes a reference to the argument variable.
  • C Call by value and call by reference are the same thing.
  • D Call by value passes a reference to the argument variable, while call by reference passes a copy of the argument value.
  • A A function that takes no arguments
  • B A declaration of a function that specifies the function's name, return type, and parameter types
  • C A function that returns a pointer to another function
  • D A function that has a variable number of arguments