Question Bank (1 mark) · Q3
Q.What is function?
Karnataka PUCTextbookShort· 1mImportance★★★★★est
10% · 15/154 Questions
✓ Free question
[!TLDR]
A function is a named block of code that carries out one task and returns a single value.
Instead of repeating the same instructions, a programmer groups them into a function, gives it a name, and calls that name wherever the task is needed. After execution the function returns a single value to the point where it was called. Functions make a program modular, shorter and easier to test.
[!ANSWER]
A function is a set of instructions written to perform a particular task; when executed it returns a single value to the calling program.
Unlock everything free for 14 days
- Full step-by-step solutions
- Concept-first explanations
- Methods, shortcuts & mistakes
- PYQ mapping + timed mock tests
Full access for 14 days. No credit card required.