0% found this document useful (0 votes)
21 views12 pages

ICSE

The document contains a series of multiple-choice questions (MCQs) related to ICSE Computer Applications, covering various programming concepts such as inheritance, loops, data types, and methods. Each question is followed by the correct answer, providing a study resource for students preparing for examinations. The content is structured in a quiz format, making it easy to review key concepts in computer applications.
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)
21 views12 pages

ICSE

The document contains a series of multiple-choice questions (MCQs) related to ICSE Computer Applications, covering various programming concepts such as inheritance, loops, data types, and methods. Each question is followed by the correct answer, providing a study resource for students preparing for examinations. The content is structured in a quiz format, making it easy to review key concepts in computer applications.
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/ 12

KPBI STUDIES

ICSE
COMPUTER
APPLICATIONS
IMPORTANT
MCQS & QUESTIONS
by KPBI STUDIES

1. The features of sharing members of one class to


another class is termed as:

COMPUTER APPLICATIONS
KPBI STUDIES

(a) Abstraction (b) Polymorphism (a) 12, 20 (b) 20, 12

(c) Encapsulation (d) Inheritance (c) 20, 24 (d) 24, 20

Ans: (d) Inheritance Ans: (b) 20, 12

2. Which of the following loop is used for fixed 9. The class encapsulates:
number of execution?
(a) methods (b) data
(a) for (b) while
(c) functionality (d) All of the above
(c) do while (d) for and while
Ans: (d) All of the above
Ans: (a) for
10.Given an array 67, 23, 98, 120, 4 what will be
3. __ variables are created once for entire class and the array values after 2 passes of Bubble Sort in
shared by all objects. descending order?

(a) static (b) instance (a) 67 98 120 23 4 (b) 98 67 120 23 4

(c) local (d) parameter (c) 98 120 67 23 4 (d) 67 98 23 120 4

Ans: (a) static Ans: (d) 67 98 23 120 4

4. Methods reside in __ 11. The true statement for Binary Search from the
given statements:
(a) class (b) package
(a) Elements in the array required to be sorted in
(c) object (d) None of these ascending order.
Ans: (a) class (b) Elements in the array required to be sorted in
5. Give the output of the following code: descending order.

Math.floor(Math.abs(-19.234)); (c) Works only with number values.

(a) 1 (b) 19.0 (c) 20 (d) 20.0 (d) Array must be sorted in any order.

Ans: (b) 19.0 Ans: (d) Array must be sorted in any order.

6. Pick the odd one out: 12. ___ members are accessible only from
subclasses outside the package.
(a) toUpperCase() (b) toLowerCase()
(a) default (b) private
(c) isDigit() (d) length()
(c) protected (d) All of the above
Ans: (d) length()
Ans: (c) protected
7. The output of the following code:
13. Function Signature refers to:
String s1= “Boolean”, s2= “,Character”;
(a) Argument List
System.out.print(“Wrapper Class:” +s1.concat(s2));
(b) Members Variables
(a) Wrapper Class:BooleanCharacter
(c) Local Variables
(b) Wrapper Class:Boolean,Character
(d) None of the above
(c) wrapper class:Boolean,Character
Ans: (a) Argument List
(d) Wrapper Class:Character,Boolean

Ans: (b) Wrapper Class:Boolean,Character

14. In 'Scanner sc = new Scanner(System.in)' what


8. The total size in bytes of the array n[5] of int is sc?
data type and m[6] of char data type:

COMPUTER APPLICATIONS
KPBI STUDIES

(a) Argument List (b) Members Variables (a) The visibility

(c) Local Variables (d) None of the above (b) Lifetime of the variable names defined within
that scope
Ans: (a) Argument List
(c) Both (a) and (b) (d) None of these
15. Behaviour of a class is implemented using:

(a) Data items (b) static Ans: (c) Both (a) and (b)

(c) functions (d) None of the above 22. What is the output of Math.abs(Math.max(-17,
-19))?
Ans: (c) functions
(a) -17 (b) -19 (c) 17 (d) 19
16. System.out.print(4 == (3+1) ? 1 : 0) will print __
Ans: (c) 17
(a) 1 (b) 0
23. The constructor in a class all have the same
(c) -1 (d) None of the above
name, but their signatures are differentiated by
Ans: (a) 1 their:

17. Give the output of the following code: (a) Return types (b) Use of overloaded keyword

int a[] = {-1, -2, -3, -4, -5}; (c) Parameter lists (d) None of these
System.out.println(a[2-1]); Ans: (c) Parameter lists
(a) 1 (b) -1 (c) -2 (d) -3 24. What is the significance of '*' while importing a
Ans: (c) -2 package?

18. The output of the method (a) It lets you specify that there are 0 or 1
“Polymorphism”.substring(“OOPS”.lastIndexOf(‘O’), character only
6);
(b) It lets you specify that the * may be replaced
(a) olymorph (b) Polymo by any string whatsoever

(c) olymor (d) olymo (c) It is the literal ‘*’ character itself

Ans: (d) olymo (d) None of these


19. What is not true about Java statement? Ans: (b) It lets you specify that the * may be
replaced by any string whatsoever
(a) Object Oriented (b) Platform dependent

(c) Robust (d) Secured 25. The valueOf() function coverts:

Ans: (b) Platform dependent (a) Primitive type to String

20.System.out.print(“Madam”.compareTo(“madam (b) String to primitive type


”)); will print __
© Character to String
(a) 32 (b) 0
(d) None of these
(c) -32 (d) false
Ans: (a) Primitive type to String
Ans: (c) -32

21. Scope determines:


26

COMPUTER APPLICATIONS
KPBI STUDIES

(d) None of these

What is the final value stored in variable x? Ans: (c) Accessible to classes in the same package
but not by classes in other packages
double a = –7.35;
30
double x = Math.abs(Math.floor(a));

(a) 9.0
int n=10,c=0;
(b) 7.0
while(n<10000)
(c) 8.0
{
(d) -7.0
c++;
Ans: (c) 8.0
n=n*10;
27
}

System.out.println(n);
Which keyword which causes an immediate exit
from the switch case or loop? How many time the loop is executed and what is
the output?
(a) break
(a) Loop is executed 4 times and the output is
(b) continue
10000
(c) jump
(b) Loop is executed 3 times and the output is
(d) exit 10000

Ans: (a) break (c) Loop is executed 4 times and the output is
1000
28
(d) Loop is executed 3 times and the output is
1000
Which of the following return statement is wrong? Ans: ((b) Loop is executed 3 times and the output is
10000
(a) return 0;
31
(b) return (s);

(c) return (s,p);


How many bytes does a string of length 5 hold?
(d) return (0);
(a) 8 bytes
Ans: (c) return (s,p);
(b) 10 bytes
29
(c) 10 bytes

(d) No fixed size


What is meant by the access specifier ‘default’ in a
method definition? Ans: (d) No fixed size
(a) Accessible only within the class 32
(b) Accessible by any other class anywhere

(c) Accessible to classes in the same package but Give the output of the following code:
not by classes in other packages
String A = “10”, B = “11”;

COMPUTER APPLICATIONS
KPBI STUDIES

int a = Integer.parseInt(A); Ans: (a) 5

int b = Integer.parseInt(B); 36

System.out.println(a+“”+ b);

(a) 21 Predict the output of the following:

(b) 1011 Math.round(16.4) + Math.floor(7.1)

(c) 1101 (a) 20.0

(d) 1110 (b) 24.0

Ans: (a) 21 (c) 25.0

33 (d) 23.0

Ans: (d) 23.0

A private method is accessible only: 37

(a) To classes in the package

(b) To any class anywhere What is basically returned by the call s.length(),
where s is a variable of String type?
(c) Within the class
(a) First character of the string
(d) None of these
(b) Last character of the stringSuper class
Ans: (c) Within the class
(c) Total number of character of the string
34
(d) Trailing blanks in the string

Ans: (c) Total number of character of the strings


The parent class also is known as the ___
38
(a) Base class

(b) Super class


Choose the odd one out:
(c) Either (a) or (b)
(a) boolean
(d) None of these
(b) float
Ans: (c) Either (a) or (b)
(c) integer
35
(d) double

Ans: (c) integer


What is the index of 25 from the following array
elements? 39

int arr[] = {42, 36, 95, 24, 75, 25};

(a) 5 What change is made to the string s based on the


below single line of code?
(b) 6
s=s.trim();
(c) 25
(a) The string restored with all spaces inside it
(d) 0
removed

COMPUTER APPLICATIONS
KPBI STUDIES

(b) The string restored with all leading spaces


removed
Java supports
(c) The string restored with all trailing spaces
(a) Single inheritance
removed
(b) Multilevel inheritance
(d) The string restored with all leading and
trailing spaces removed (c) Multiple inheritance
Ans: (d) The string restored with all leading and (d) Both a and b
trailing spaces removed
Ans: (d) Both a and b
40
44

The expression str.charAt(str.length() – 1) always


refers to: A bundle of similar classes is called a

(a) The first character of str (a) Package

(b) The second character of str (b) Packed classes

(c) The last character of str (c) Group

(d) The second last character of str (d) None of these

Ans: (c) The last character of str Ans: (a) Package

41 45

Who developed Java? Alternative way to send multiple values from a


function is:
(a) James Gosling
(a) Arrays
(b) Robert James
(b) Tuples
(c) Bjarne Stroustrup
(c) Lists
(d) Charles Babbage
(d) None of these
Ans: (a) James Gosling
Ans: (a) Arrays
42
46

Which of the following is a blue print that creates


of similar types? The function that modifies its parameter is called
a:
(a) Abstraction
(a) Virtual function
(b) Encapsulation
(b) Pure function
(c) class
(c) Impure function
(d) function
(d) None of these
Ans: (c) class
Ans: (c) Impure function
43
47

COMPUTER APPLICATIONS
KPBI STUDIES

Choose the correct value of e, if x=3, y=7

Choose the odd one out: x-=x++ - ++y;

(a) Import statement (a) 8

(b) Function prototype (b) 6

(c) Signature of a function (c) -8

(d) Function declaration (d) 2

Ans: (a) Import statement Ans: (c) -8

48 52

Choose the odd one out: Choose the attributes required for class definition:

(a) Import statement (a) Keyword class

(b) Function prototype (b) Name of the class

(c) Signature of a function (c) Keyword import

(d) Function declaration (d) Both a and b

Ans: (a) Import statement Ans: (d) Both a and b

49 53

A private function is accessible to: Choose the attributes required for class definition:

(a) Own class only (a) Keyword class

(b) Subclass (b) Name of the class

(c) Subclass and classes in same package (c) Keyword import

(d) None of thse (d) Both a and b

Ans: (a) Own class only Ans: (d) Both a and b

50 54

System.out.println("Hi"); is an example of: Which of the following is given the highest


precedence?
(a) Assignment
(a) &&
(b) Method Invocation
(b) %
(c) Object creation
(c) >=
(d) Increment
(d) ++
Ans: (b) Method Invocation
Ans: (d) ++
51
55

COMPUTER APPLICATIONS
KPBI STUDIES

59

Which of the following is given the highest


precedence?
Predict the output of
(a) && System.out.println(Character.toUpperCase('R'));

(b) % (a) r

(c) >= (b) R

(d) ++ (c) Compiler error

Ans: (d) ++ (d) Runtime error

56 Ans: (b) R

59

Give the output of Math.ceil(-0.6)

(a) -1.6 Predict the output of


System.out.println(Character.toUpperCase('R'));
(b) -1.5
(a) r
(c) -1.0
(b) R
(d) -0.0
(c) Compiler error
Ans: (d) -0.0
(d) Runtime error
57
Ans: (b) R

60
Name the wrapper class of isLetterOrDigit(char)
argument.

(a) Integer Complete the syntax of substring() method:

(b) char String object.substring(___);

(c) Character (a) End index

(d) Both b and c (b) Mid index

Ans: (c) Character (c) Start index

58 (d) Length - 1

Ans: (c) Start index

Which method converts a string to a primitive long 61


data type?

(a) Long.parseInt()
What is the return type of valueOf() method?
(b) String.parseLong
(a) int
(c) Long.parseLong()
(b) float
(d) None of these
(c) String
Ans: (c) Long.parseLong()
(d) Any primitive type

COMPUTER APPLICATIONS
KPBI STUDIES

Ans: (c) String Ans: (b) new

62 66

What is the last index number of the array int How many bits are reserved for char data type?
num[] = new int[9];?
(a) 32
(a) 10
(b) 64
(b) 9
(c) 8
(c) 8
(d) 16
(d) 7
Ans: (d) 16
Ans: (c) 8
67
63

First line of function declaration in Java is termed


Choose the odd one out: as:

(a) Non-parameterized constructor (a) Function signature

(b) Parameterized constructor (b) Function prototype

(c) Copy constructor (c) Formal parameters

(d) Multi level constructor (d) Actual parameters

Ans: (d) Multi level constructor Ans: (b) Function prototype

64 68

It is used to skip the current execution of the loop OOP's principle that implements function
and send the control to the next execution. overloading.

(a) return (a) Abstraction

(b) break (b) Encapsulation

(c) continue (c) Inheritance

(d) None of the above (d) Polymorphism

Ans: (c) continue Ans: (d) Polymorphism

65 69

The keyword used to create object in Java. Give the output of the following code:

(a) import Math.max(Math.ceil(-20.23), Math.floor(-20.23));

(b) new (a) -19

(c) this (b) -19.0

(d) static (c) -20

COMPUTER APPLICATIONS
KPBI STUDIES

(d) -20.0 (a) s.substring(2, s.length);

Ans: (d) -20.0 (b) s.charAt(2)+s.charAt(s.length()-1);

70 (c) s.substring(2, s.length()-1);

(d) s.substring(2);

Give the output of the following code: Ans: (d) s.substring(2);

String s[] = {"Niloy", "Supratik", "Ashish", 74


"Sebastian", "Abhishek", "Prosun"};

System.out.println(s[s[0].length()-1]);
The output of the following code:
(a) Ashish
System.out.println(Character.isUpperCase('R'));
(b) Sebastian
(a) 1
(c) Abhishek
(b) 0
(d) Prosun
(c) true
Ans: (c) Abhishek
(d) false
71
Ans: (c) true

75
public member of private class get accesssed by:

(a) Other class in the same package


If a function contains 4 return statements, how
(b) Class in any other package many o them will be executed?

(c) Same class (a) All

(d) None of the above (b) Any 2

Ans: (c) Same class (c) Any 1

72 (d) None

Ans: (c) Any 1

Non-parameterized constructor is also termed as: 76

(a) Constructor with arguments

(b) Default constructor API that contains Wrapper class:

(c) Copy constructor (a) java.util

(d) None of the above (b) java.io

Ans: (b) Default constructor (c) java.lang

73 (d) java.awt

Ans: (c) java.lang

String s = "Aanisha Sinha", the correct java 77


statement to extract characters from index
position 2 to length of the string:

COMPUTER APPLICATIONS
KPBI STUDIES

__ is used to send the control back to method call. The blueprint that defines the variables and the
methods common to all of a certain kind is termed
(a) return
as:
(b) void
(a) class
(c) parameters
(b) object
(d) None of the above
(c) package
Ans: (a) return
(d) method
78
Ans: (a) class

82
The loop executes once even if the condition is
false.
What is the final value stored in variable x?
(a) while
double x = Math.ceil(Math.abs(-7.3));
(b) for
(a) 7.0
(c) do while
(b) 8.0
(d) both for and while
(c) 6.0
Ans: (c) do while
(d) 9.0
79
Ans: (b) 8.0

83
Pick the odd one out:

(a) &&
Name the type of error in the statement given
(b) !=
below:
(c) !
double x;y;z;
(d) ==
(a) Logical error
Ans: (c) !
(b) Syntax error
80
(c) Runtime error

(d) No error
The constant value used in a program:
Ans: (b) Syntax error
(a) keyword
84
(b) token

(c) identifier
A ___ method need to be called with the help of
(d) literal an object.

Ans: (c) ! (a) void

81 (b) class

(c) static

COMPUTER APPLICATIONS
KPBI STUDIES

(d) non-static "MISSISSIPPI".indexOf('S') +


"MISSISSIPPI".lastIndexOf('I');
Ans: (c) static
(a) 10
85
(b) 12

(c) 20
Parameters used in the method call statements are
__. (d) 11

(a) Actual parameter Ans: (b) 12

(b) Formal parameter 89

(c) Informal parameter

(d) Void parameter Variable that is declared with in the body of a


method is termed as -
Ans: (a) Actual parameter
(a) Instance variable
86
(b) class variable

(c) Local variable


When primitive data type is converted to its
corresponding object of its class, it is called as __. (d) Argument variable

(a) Boxing Ans: (c) Local variable

(b) Unboxing 90

(c) Explicit type conversion

(d) Implicit type conversion Identify the correct array declaration statement -

Ans: (a) Boxing (a) int a[10];

87 (b) int a[] = new int[10];

(c) int arr[i]=10;

State the value of y after the following is executed: (d) int a[10] = new int[];

char x='7'; Ans: (b) int a[] = new int[10];

y=Character.isLetter(x);

(a) false

(b) true

(c) 7

(d) '7'

Ans: (a) false

88

Give the output of the following String method:

COMPUTER APPLICATIONS

You might also like