MCQ User-defined Methods for ICSE Computer Application Class-10. These MCQ / Objective Type Questions is based on latest reduced syllabus according 2021-22 session on bifurcated pattern. Main motto of MCQ Type Question is cracking the next upcoming exam of council. Visit official website CISCE for detail information about ICSE Board Class-10 Computer Application .
MCQ Type Questions User-defined Methods for ICSE Class-10 Computer Application
Board | ICSE |
Class | 10th (X) |
Subject | Computer Application |
Chapter | User-defined Methods |
Syllabus | on bifurcated syllabus (after reduction) |
Session | 2021-22 |
Topic | MCQ / Objective Type Question |
ICSE Class-10 Computer Application MCQ Type Questions of User-defined Methods
Question 1: Write the output of the following code :
long series (int p)
{
long f=1;
for(i=1;i<=p;i++)
{
f=f*i
}return f;
}
(a) Fibonacci Series
(b) Factor of a number
(c) Factorial of a number
(d) None Of these
Answer (c) Factorial of a number
Question 2: It is compulsory to return a value from a function
(a) True
(b) False
(c) True if it is a pure function
(d) True if it is an impure function
Answer (b) False
Question 3: A function in java is …………… by default
(a) Private
(b) Public
(c) Protected
(d) None
Answer (b) Public
Question 4: Alternative way to send multiple values from a function is:
(a) Arrays
(b)Tuples
(c) Lists
(d) None
Answer (a) Arrays
Question 5: The default return type of a User defined function
(a) float
(b) int
(c) Void
(d) Null
Answer (b) int
Question 6: The keyword used to return a value from a function is:
(a) returns
(b) return
(c) None
(d) send
Answer (b) return
Question 7: Static functions can access
(a) Static data members
(b) Non static data members
(c) Both static and non static data members
(d) None
Answer (a) Static data members
Question 8: A function name can begin with
(a) An alphabet
(b) Sign
(c) A digit
(d) Space
Answer (a) An alphabet
Question 9: The return type must be specified while defining a user defined function
(a) True
(b) False
(c) Error
(d) None of these
Answer (b) False
Question 10: A function in java can be written
(a) Inside a class
(b) Outside a class
(c) Inside main) function
(d) None
Answer (a) Inside a class
Question 11: An overloaded function is
(a) A function with same name but different return types
(b) A function with same name but different number of parameters
(c) A function with same name but different types of parameters
(d) Both (b) and (c)
Answer (d) Both (b) and (c)
Question 12: Which is odd in given options
(a) Function overloading
(b) Polymorphism
(c) One this in many different forms
(d) Inheritance
Answer (d) Inheritance
Question 13: A local variable of a function has more priority than
(a) A variable defined globally
(b) A variable defined in an imported class
(c) A variable defined in main
(d) All of the above
Answer (d) All of the above
Question 14: Which is odd in given options
(a) function
(b) method
(c) A block of code in { }
(d) Package
Answer (d) Package
Question 15: The function that modifies its parameters is called a
(a) Virtual function
(b) Pure function
(c) Impure function
(d) None
Answer (c) Impure function
Question 16: The prototype of a function take( that returns an int and receives an array is
(a) public int take(int ar [ ])
(b) public int take(int ar)
(c) public int take(int int ar [ ])
(d) None of these
Answer (a) public int take(int ar [ ])
Question 17: Given the code:
int Change(int p,int q)
{
p=p*q;
return p;
}
The statement to call the above function will be
(a) Change(10,20)
(b) r=Change(10,20)
(c) Change(9.5,6.7)
(d) None
Answer (a) Change(10,20)
Question 18: Which is odd in given options
(a) import statement
(b) function prototype
(c) signature of a function
(d) function declaration
Answer (a) import statement
Question 19: Function prototype means
(a) Return value of a function
(b) Name of the function
(c) Return type of the function
(d) Return type, Name and Inputs to a function
Answer (d) Return type, Name and Inputs to a function
Question 20: The prototype of a function “Show ()” that returns a float and takes two ints is
(a) public void Show ()
(b) public void Show(int a, int b)
(c) public void Show(int, float)
(d) public float Show(int, int)
Answer (d) public float Show(int, int)
Question 21: An array is passed by ………… to a User Defined Functions
(a) Reference
(b) Value
(c) Address
(d) None of the above
Answer (a) Reference
Question 22: All the functions of a package can be imported by using the ……………….. character with import statement
(a) _
(b) /
(c) *
(d) @
Answer (c) *
Question 23: A User Defined Function can have ………. number of parameters
(a) 2
(b) 3
(c) 4
(d) Any number
Answer (d) Any number
Question 24: A deceleration can occur ………… in a body of a JAVA method.
(a) in the beginning
(b) in the middle
(c) anywhere
(d) at the end
Answer (c) anywhere
Question 25: A user defined function in Java can return ……………….. number of values
(a) 2
(b) 3
(c) 1
(d) None of these
Answer (c) 1
Question 26: Defining two or more methods in the same class with same name is called ……………
(a) constructor overloading
(b) Function overloading
(c) Static function
(d) none of these
Answer (b) Function overloading
Question 27: A private function is accessible to …………..
(a) Own class only
(b) Subclass
(c) Subclass and classes in same package
(d) None
Answer (a) Own class only
Question 28: Which feature of OOPS is illustrated by function overloading
(a) Inheritance
(b) Polymorphism
(c) Encapsulation
(d) Inheritance
Answer (b) Polymorphism
Question 30: What is the access specifier for the function int recall (int, int)
(a) Private
(b) Public
(c) Protected
(d) None of these
Answer (d) None of these
Question 31: Which is odd in given options
(a) Parameter
(b) Class
(c) inputs to a function
(d) argument
Answer (b) Class
Question 32: The function call in which the data in actual parameters get changed is called …………
(a) call by value
(b) call by reference
(d) None of the above
(c) formal call
Answer (b) call by reference
Question 33: To receive an array arr of size 10 in a function result() he correct prototype is:
(a) void result( int arr [ ])
(b) void result( int arr[10])
(c) Both a and b
(d) None of the above
Answer (c) Both a and b
Question 34: main() function is a
(a) User defined function
(b) System defined function
(c) Library defined function
(d) None
Answer (a) User defined function
Question 35: The function Callitself(n) gives:
public int callitself(intn)
{
if (n==1)
return 1;
else
return n*callitself(n-10);
}
If it is called as cllitself(6)
(a) 120
(b) 620
(c) 720
(d) 400
Answer (c) 720
–: End of MCQ User-defined Methods for ICSE :-
-: also visit :-
- MCQ Type Questions for ICSE Class-10
- ICSE Class-10 Text book Solutions, Notes , Syllabus, Paper, Notes
Please share with your ICSE friends if it is helpful
Thanks
Very helpfull
thanks
got a perfect website for computer mcqs after searching for long time
very helpful