0% found this document useful (0 votes)
25 views2 pages

MCQ Methods

The document contains questions about functions and methods in Java. It covers topics like function definition, parameters, return types, scope, naming conventions, and polymorphism. The questions are multiple choice and fill in the blank format testing understanding of key concepts around functions in Java.

Uploaded by

priyamdas425
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views2 pages

MCQ Methods

The document contains questions about functions and methods in Java. It covers topics like function definition, parameters, return types, scope, naming conventions, and polymorphism. The questions are multiple choice and fill in the blank format testing understanding of key concepts around functions in Java.

Uploaded by

priyamdas425
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

A. Tick (√ ) the correct option.

1. Once a function is defined, it can be invoked repeatedly. What is this feature called?
a. Interface b. Reusability
c. Restructuring d. All of these

2. If a function does not return any value, its return type should be:
a. int b. no-return
c. void d. empty

3. A function that computes a value and returned is called:


a. Computational function b. Manipulative function
c. Procedural function d. None of these

4. A type of parameter that are used to identify what data is to be passed to a function is called:
a. Formal parameter b. Actual parameter
c. Both a and b d. None of these

5. The parameter list in a function definition is called:


a. Function prototype b. Function signature
c. Both a and b d. None of these

6. The first line of the function definition is called:


a. Function prototype b. Function signature
c. Both a and b d. None of these

7. The number of values that a function can return is:


a. 1 b. 2 c. 3 d. 4
8. A local variable in a function has its scope:
a. Limited within the function
b. Can be accessed anywhere within the same class
c. No limitation at all
d. None of these

9. Which among the following is a valid name for a function?


a. function b. 2function
c. fun in action d. fun#

10. Which among the following is not a valid access specifier?


a. public b. private
c. partially d. protected

B. Fill in the blanks.


1. In Java functions are known as -------
2. Methods are contained in --------
3. The function name and the parameter list together is known as -------------
4. The access specifier, return type and the function signature together is known as
------
5. The arguments of the function given in function prototype are called ------
6. The arguments of the function given in statement that calls the function
are called ------
7. If a function does not return any value, the returning type in the function prototype
will be -------
8. When a function is called by ------, the values of actual parameters are copied
into separate memory locations as allocated by the formal parameters.
9. Impure functions uses call by ------
10. One of the practical implementation of polymorphism is --------

You might also like