ICSE Class 10 Computer Applications Question 1 of 43

User-Defined Methods — Question 1

Back to all questions
1
Question

Question 1

What is a function ? What is its other name ? What is function prototype ?

Answer

A function is a named block of code within a class. It executes a defined set of instructions when called from another part of the program.

A function is also known as a member method.

A method/function prototype is the first line of the function definition that contains the access specifier, return type, method name and a list of parameters.