Any2Quiz
Quizzes / CBSE / Class 11 / ICT / Programming

Functions Quiz - CBSE Class 11 ICT

Free practice quiz: Functions (CBSE Class 11 ICT). 20 multiple-choice questions with answers and explanations. Play online, no sign-up needed.

This CBSE Class 11 ICT practice quiz has 20 multiple-choice questions on Functions, and 20 of them come with an explanation. Try the 5 sample questions below (tap an option to check yourself), then play the full quiz online. No sign-up needed.

Start quiz: 20 questions, free

Sample questions

  1. What is a function in programming?

    Show answer

    Answer: A. A block of code that performs a specific task

    A function is a reusable block of code designed to perform a specific task. It improves code organization and readability.

  2. Explain the difference between a function's definition and a function's call.

    Show answer

    Answer: C. Definition declares the function; call executes it

    The function definition describes what the function does. The function call is the action of using it.

  3. What is the scope of a variable declared inside a function?

    Show answer

    Answer: B. Local scope

    Variables declared inside a function have local scope; they are only accessible within that function.

  4. What is the difference between pass-by-value and pass-by-reference when passing arguments to a function?

    Show answer

    Answer: A. Pass-by-value creates a copy; pass-by-reference uses the original

    Pass-by-value creates a copy of the argument, while pass-by-reference uses the original variable's memory location.

  5. Discuss the advantages and disadvantages of using recursive functions.

    Show answer

    Answer: C. Advantages: Simplicity, Disadvantages: Potential stack overflow

    Recursive functions can elegantly solve certain problems, but excessive recursion can lead to stack overflow errors.

Take the full quiz

More questions in this quiz

Answers and explanations are in the full quiz.

  1. What is the purpose of a function's return statement?
  2. What are function parameters?
  3. What is a function call?
  4. What is the purpose of function arguments?
  5. What is recursion in the context of functions?
  6. What is a void function?
  7. Explain the concept of function overloading.
  8. What is the significance of modularity in programming, especially concerning functions?
  9. How can functions help in reducing code redundancy?
  10. Describe the concept of function prototypes and their importance.
  11. How can you handle errors gracefully within a function?
  12. Explain the importance of choosing appropriate data types for function parameters and return values.
  13. How can you design functions to be more reusable and adaptable to various scenarios?
  14. Explain how higher-order functions work and provide an example (if applicable within the scope of the NCERT syllabus).
  15. Describe different strategies for testing and debugging functions, including unit testing and integration testing.

More quizzes

Browse all Programming quizzes

More to play

Daily ChallengeA new quiz every day. Keep your streak.HangmanGuess the word, letter by letter.Story QuestLearn through short interactive stories.All quizzesCBSE, ICSE, competitive exams and more.