INTRODUCTION
User-Defined Method is an important chapter from Computer Applications. It is under ICSE 2022 Computer Applications syllabus.
In this article, I have shared with you the important MCQs from the User-Defined Methods. Please read the questions carefully and try finding their answer, and then look for the given answers.
Important MCQ from the User-Defined Methods :
Q1. Which of the following Java keyword indicates that a method has no return type?
a. null
b. Void
c. Private
d. Return
ANSWER: b
Q2. Which of the following functions (methods) do not change the state of an object?
a. Impure function
b. Pure function
c. Reserved function
d. Both b & c
ANSWER: b
Q3. What shall be written in the blank to illustrate function overloading?
Max(int a , int b)
____ (double i, double b)
a. area
b. max
c. class name
d. we can give any name
ANSWER: b
Q4. How are the reference types passed in Java?
a. By value
b. By reference
c. By dot operator
d. Cannot say
Answer: b
Q5. Formal parameters are also known as :
a. Standard parameters
b. Virtual parameters
c. Tertiary parameters
d. Dummy parameters
ANSWER : d
Q6. The parameters that appear in the method call are called ______ parameters.
a. Actual
b. Formal
c. Partial
d. Both a & b
ANSWER: a
Q7. If a function contains six return statements, how many of them will be executed?
a. All the above
b. none of the statements
c. 3 statements
d. Only one
Answer : d
Q8. Choose the values of p after the execution of the following function?
The values passed are 10 & 20
void func(int p, intq)
{
p=p*q;
q=p*q;
p=p*q;
System.out.println(p+", "+b);
}
a. 800000
b. 750000
c. 480000
d. 530000
ANSWER: a
Q9. Which of the following is the reference data type?
a. char
b. boolean
c. arrays
d. long
ANSWER: c
Q10. Name the return type of the main() method?
a. void
b. static
c. int
d. Any data type
ANSWER: a
Q11. Will the impure methods return the same when the same arguments are given?
a. Yes
b. No
c. Wrong Question
d. Cannot say
ANSWER: b
Q12. The String objects are _____ in Java.
a. Mutable
b. Immutable
c. Invalid
d. Arguments
ANSWER: b
Q13. If the strings are passed by reference, can they be changed?
a. Yes
b. No
c. Incorrect question
d. Cannot say
Answer: b
Q14. Fill in the blanks:
MyFunc obj = new ______;
a. Myfunc()
b. class name
c. MyFunc()
d. Both b & c
Answer :c
Q15. A method is a named block of code within a ______.
a. Function
b. Scope
c. Class
d. Both b & c
Answer: c
Q16. ______ is referred to the two situations when there are two or more possible matches in the invocation of an overloaded method.
a. Method Invocation
b. Ambiguous invocation
c. Initialization
d. Cannot say
ANSWER: b
So, these were the most important MCQs from the User-Defined Methods, ICSE Class 10. If you find these questions important, please share them with your friends. If you have any queries, tell me in the comments.
Friends these were the top 15 MCQ from "REVISION OF CLASS 9 SYLLABUS" from Computer Applications. Thank you so much for reading my article. I hope everyone liked this article. For more such questions, follow my page.
If you liked these questions, please share them with your friends. Practice these questions more and more. For a better understanding of the chapter, read it more and more.
INTRODUCTION
User-Defined Method is an important chapter from Computer Applications. It is under ICSE 2022 Computer Applications syllabus.
In this article, I have shared with you the important MCQs from the User-Defined Methods. Please read the questions carefully and try finding their answer, and then look for the given answers.
Important MCQ from the User-Defined Methods :
Q1. Which of the following Java keyword indicates that a method has no return type?
a. null
b. Void
c. Private
d. Return
ANSWER: b
Q2. Which of the following functions (methods) do not change the state of an object?
a. Impure function
b. Pure function
c. Reserved function
d. Both b & c
ANSWER: b
Q3. What shall be written in the blank to illustrate function overloading?
Max(int a , int b)
____ (double i, double b)
a. area
b. max
c. class name
d. we can give any name
ANSWER: b
Q4. How are the reference types passed in Java?
a. By value
b. By reference
c. By dot operator
d. Cannot say
Answer: b
Q5. Formal parameters are also known as :
a. Standard parameters
b. Virtual parameters
c. Tertiary parameters
d. Dummy parameters
ANSWER : d
Q6. The parameters that appear in the method call are called ______ parameters.
a. Actual
b. Formal
c. Partial
d. Both a & b
ANSWER: a
Q7. If a function contains six return statements, how many of them will be executed?
a. All the above
b. none of the statements
c. 3 statements
d. Only one
Answer : d
Q8. Choose the values of p after the execution of the following function?
The values passed are 10 & 20
void func(int p, intq)
{
p=p*q;
q=p*q;
p=p*q;
System.out.println(p+", "+b);
}
a. 800000
b. 750000
c. 480000
d. 530000
ANSWER: a
Q9. Which of the following is the reference data type?
a. char
b. boolean
c. arrays
d. long
ANSWER: c
Q10. Name the return type of the main() method?
a. void
b. static
c. int
d. Any data type
ANSWER: a
Q11. Will the impure methods return the same when the same arguments are given?
a. Yes
b. No
c. Wrong Question
d. Cannot say
ANSWER: b
Q12. The String objects are _____ in Java.
a. Mutable
b. Immutable
c. Invalid
d. Arguments
ANSWER: b
Q13. If the strings are passed by reference, can they be changed?
a. Yes
b. No
c. Incorrect question
d. Cannot say
Answer: b
Q14. Fill in the blanks:
MyFunc obj = new ______;
a. Myfunc()
b. class name
c. MyFunc()
d. Both b & c
Answer :c
Q15. A method is a named block of code within a ______.
a. Function
b. Scope
c. Class
d. Both b & c
Answer: c
Q16. ______ is referred to the two situations when there are two or more possible matches in the invocation of an overloaded method.
a. Method Invocation
b. Ambiguous invocation
c. Initialization
d. Cannot say
ANSWER: b
You must be logged in to post a comment.