NSCT – Functions / Methods MCQs 20 min Score: 0 Attempted: 0/20 Subscribe 1. What is a function in programming? (A) A loop (B) A type of variable (C) A data type (D) A block of code that performs a specific taskShow All Answers 2. What is another name for a function in some languages? (A) Operator (B) Variable (C) Method (D) LoopShow All Answers 3. Why are functions used in programming? (A) To repeat code (B) To make code modular and reusable (C) To store data (D) To create variablesShow All Answers 4. What is the part of a function where input values are received called? (A) Output (B) Return type (C) Body (D) Arguments / ParametersShow All Answers 5. What is the value returned by a function called? (A) Input (B) Argument (C) Return value (D) ParameterShow All Answers 6. Which keyword is commonly used to send a value back from a function? (A) send (B) return (C) exit (D) outputShow All Answers 7. What is a function that does not return a value called? (A) Return function (B) Void function (C) Parameter function (D) Modular functionShow All Answers 8. What is a function without parameters called? (A) Parameterized function (B) Modular function (C) Return function (D) Non-parameter functionShow All Answers 9. What is a function with input parameters called? (A) Non-parameter function (B) Parameterized function (C) Return function (D) Modular functionShow All Answers 10. What is it called when a function calls itself? (A) Recursion (B) Looping (C) Iteration (D) ConditionalShow All Answers 11. Which of the following is a benefit of using functions? (A) All of the above (B) Easier to debug (C) Better organization (D) Reusable codeShow All Answers 12. Where is the code of a function written? (A) Function body (B) Function header (C) Function call (D) Main programShow All Answers 13. How is a function executed in a program? (A) By declaring it (B) By calling it (C) By returning it (D) By naming itShow All Answers 14. What is a function prototype? (A) A function call (B) A variable declaration (C) A type of loop (D) A declaration of a function without the bodyShow All Answers 15. Can functions be called from other functions? (A) No (B) Yes (C) Only in loops (D) Only in conditional statementsShow All Answers 16. Which of the following can functions NOT do? (A) Return multiple values in some languages (B) Change the syntax of the programming language (C) Execute a specific task (D) Accept input parametersShow All Answers 17. What is the main difference between a function and a procedure? (A) There is no difference (B) A function cannot take input (C) A procedure returns a value, a function may not (D) A function returns a value, a procedure may notShow All Answers 18. Can functions help in reducing code repetition? (A) No (B) Yes (C) Only in loops (D) Only in conditionalsShow All Answers 19. Which term describes the use of a function without knowing its internal details? (A) Inheritance (B) Encapsulation (C) Abstraction (D) PolymorphismShow All Answers 20. Can functions be defined inside other functions in some programming languages? (A) No (B) Yes (C) Only in loops (D) Only in classesShow All Answers