COMPUTER SCIENCE 10TH – DETAILED QUESTION ANSWERS
Chapter # 05: FUNCTIONS
Q.1: What do you know about functions?
Ans:
INTRODUCTION TO FUNCTIONS
A function is a block of code that performs a particular task. It is also called a method or a sub-routine or a procedure, etc. There are some situations when we need to write a particular block of code more than once in our program. This may lead to bugs and irritation for the programmer. C++ language provides an approach in which you need to declare and define a group of statements once and that can be called and used whenever required. This saves both time and space. Every C++ program has at least one function, which is main()
, and all the programs can define additional functions.