Advertisements
Chapters
1.2: Elementary Concept of Objects and Classes
1.3: Values and Data Types
1.4: Operators in Java
1.5: Introduction to Java
1.5: Input in Java
1.6: Mathematical Library Methods
1.7: Conditional Statements in Java
1.8: Iterative Constructs in Java
1.9: Nested Loop
2: Library Classes
▶ 3: Arrays (Single Dimensional and Double Dimensional)
4: String Handling
5: User - Defined Methods
6: Class as the Basis of all Computation (Objects and Classes)
7: Constructors
8: Encapsulation and Inheritance
![Avichal solutions for Computer Applications [English] Class 10 ICSE chapter 3 - Arrays (Single Dimensional and Double Dimensional) Avichal solutions for Computer Applications [English] Class 10 ICSE chapter 3 - Arrays (Single Dimensional and Double Dimensional) - Shaalaa.com](/images/computer-applications-english-class-10-icse_6:1e1eb1b47d2b4696b609e5cd9260118f.jpg)
Advertisements
Solutions for Chapter 3: Arrays (Single Dimensional and Double Dimensional)
Below listed, you can find solutions for Chapter 3 of CISCE Avichal for Computer Applications [English] Class 10 ICSE.
Avichal solutions for Computer Applications [English] Class 10 ICSE 3 Arrays (Single Dimensional and Double Dimensional) Review Insight [Pages 236 - 237]
What is meant by direct initialization of an array?
What is meant by the subscript of an array?
Name a technique that can be used to concatenate (join) the elements of two different arrays into a single array.
Differentiate between the following:
length and length()
What is the difference between the linear search and the binary search technique?
State the total size in bytes of the array a[4] of char data.
State the total size in bytes of the array p[4] of float data type.
What is Array?
Write a statement to declare an integer array of 10 elements.
Name the search or sort algorithm that makes several passes through the array, selecting the next smallest item in the array each time and placing it where it belongs in the array.
Name the search or sort algorithm that, at each stage, compares the sought key value with the key value of the middle element of the array.
If int n[] = {l, 2, 3, 5, 7, 9, 13, 16}, what are the values of x and y?
x = Math.pow(n[4], n[2]);
y = Math.sqrt(n[S] + n[7]);
Find the errors in the given program segment and re-write the statements correctly to assign values to an integer array.
int a = new int (5);
for (int i = 0; i < = 5; i++) a [i] = i;
What will this code print?
int arr[] = new int[5];
System.out.println(arr);
0
value stored in arr[0]
0000
Garbage value
If int x [ ] = { 4, 3,7, 8, 9,10}; what are the values of p and q ?
(i) p = x.length
(ii) q = x[2] + x[5] * x[1]
Case-Study based question (Solved):
As a homework assignment, your computer teacher has given an incomplete program to accept the integer numbers in a 3x4 double dimensional array. The program has some places left blank marked with ?1?, ?2?, ?3? and ?4? to be filled with appropriate keyword / expression as shown below:
import java.util.*;
class Sum
{
public static void main(String args [])
{
Scanner in=new Scanner(....?1?......);
int 1, j, s = 0;
int m[][] = .........?2?.........;
System.out.println(“Enter the numbers in the matrix”);
for (i = 0; i < 3; i++)
{
for (j = 0; j < 4; j++)
m[i][j] = ........?3?.......;
}
for (i = 0; i < 3; i++)
{
for (j = 0; j < 4; j++)
if (.....?4?.....)
s = s + m[i][j];
}
System.out.println(“Sum of even numbers in the matrix: " + s);
}
}
Based on the above discussion, answer the following questions:
- What keyword / expression will be filled in place of ?1?
- What keyword / expression will be filled in place of ?2?
- What keyword / expression will be filled in place of ?3?
- What keyword / expression will be filled in place of ?4?
Avichal solutions for Computer Applications [English] Class 10 ICSE 3 Arrays (Single Dimensional and Double Dimensional) EXERCISES [Pages 238 - 243]
Multiple Choice Questions:
Which of the following is the correct usage?
int a[−40]
int a[40]
float a[0 − 40]
None
Which element is represented by a[10]?
10th
9th
11th
None
Cell numbers of a dimensional array are also known as ______.
Packets
Blocks
Subscripts
Compartments
A dimensional array is also known as ______.
Subscripted variable
Actual variable
Compound variable
None
An array element can be accessed through ______.
Dots
Element name
Index number
None
Indicate the error message which displays, if the following statement is executed:
int a[5] = {28, 32, 45, 68, 12};
Insufficient cells
Array index out of bounce
Elements exceeding cells
None
The following statement : int code[ ]= {25, 37, 38, 42);
Assigns 37 to code[1]
Assigns 25 to code[1]
Assigns 38 to code[3]
Assigns 42 to code[0]
The elements of array[50] are numbered:
From 1 to 50
From 0 to 49
From 1 to 51
None
Which of the following function finds the size of array char m[] = {'R','A','J','E','N','D','R','A'};?
m.size of (a)
m.elements of (m)
m.length
None
A Single Dimensional array contains N elements. What will be the last subscript?
N−1
N
N+1
None
Fill in the blanks:
Each element of a single dimensional array is accessed using variable along with ______ enclosed within square bracket.
A double dimensional array uses ______ type of indices.
To access the elements in reverse order, the single dimensional array is traversed starting with ______ index.
Complete the following statement:
int ______ = ______ int a[15]
The last index of a single dimensional array will be ______, if it is declared to store 8 elements.
Give the output of the following program snippet:
int m[ ] = {2, 4, 6, 8};
System.out.println(m[1] + ' ' + m[2]);
Give the output of the following program snippet:
int a[ ] =(2, 4, 6, 8, 10};
a[0] = 23;
a[3] = a[1];
int c = a[0] + a[1];
System.out.println("Sum = " + c);
Give the output of the following program snippet:
int a[] = new int [5];
a[0] = 4; a[1] = 8; a[2] = 7; a[3] = 12; a[4] = 3;
System.out.println(a[2 + 1]);
Give the output of the following program snippet:
int a[4] = (2, 4, 6, 8);
for (i = 0; i <= 1; i++)
{
s = a[i] + a[3 − i];
System.out.println(s);
}
Case-Study based question:
Java allows storing a number of similar type of data using a common variable name such that each element is accessed with the help of a subscript or cell number. This is done with a purpose that any operation can be carried commonly on all the data items. You can search a number by dividing the sorted elements in two halves in each iteration. Beyond searching, the elements can also be sorted using different techniques. One technique allows us to choose the lowest element starting with a specific subscript in each pass and place it in appropriate position whereas, in other technique, consecutive elements are compared and a number of exchanges are made in each pass. We can also join two or more arrays to form a single set.
Based on the above discussion, answer the following questions:
- What is the term used for a common variable storing a number of similar data?
- Numeric variable
- Static variable
- Subscripted variable
- Local variable
- Which of the following techniques is used for searching an element by dividing the sorted list of elements into two halves in each iteration?
- Liner search
- Binary search
- Sequential search
- None of the above
- Which of the following sorting techniques finds the lowest element in each pass and places it in appropriate position?
- Selection sort
- Binary sort
- Bubble sort
- Insertion sort
- Which of the following term is used for joining two or more arrays to form a single array?
- Joining
- Collecting
- Merging
- Sorting
Write short answers:
What is meant by Dimensional Array?
Name the two types of Dimensional Array.
What is the need of Dimensional Array? Explain.
'Array is a composite data type'. Explain this statement.
Define the following with its construct:
Single Dimensional Array
Define the following with its construct:
Double Dimensional Array
Differentiate between the following:
Subscript and Subscripted variable.
Differentiate between the following:
Char a[5] and int a[5]
Differentiate between the following:
Ordinary variable and array variable.
Differentiate between the following:
String a[5] and String a[]
Differentiate between searching and sorting.
What is the difference between the linear search and the binary search technique?
Differentiate between the following:
Sequential sort and Bubble sort.
Differentiate between the following:
length and length()
Unsolved Programs on Single and Double Dimensional Arrays:
Write a program in Java to store 20 numbers (even and odd numbers) in a Single Dimensional Array (SDA). Calculate and display the sum of all even numbers and all odd numbers separately.
Write a program in Java to store 20 temperatures in °F in a Single Dimensional Array (SDA) and display all the temperatures after converting them into °C.
Hint: `"c"/5 = ("f" - 32)/9`
Write a program in Java to store 10 numbers (including positive and negative numbers) in a Single Dimensional Array (SDA). Display all the negative numbers followed by the positive numbers.
Sample Input:
n[0] | n[1] | n[2] | n[3] | n[4] | n[5] | n[6] | n[7] | n[8] | n[9] |
15 | 21 | −32 | −41 | 54 | 61 | 71 | −19 | −44 | 52 |
Sample Output: −32, −41, −19, −44, 15, 21, 54, 61, 71, 52
Write a program in Java to store 20 numbers in a Single Dimensional Array (SDA). Display the numbers which are prime.
Sample Input:
n[0] | n[1] | n[2] | n[3] | n[4] | n[5] | n[6] | n[7] | n[8] | n[9] |
45 | 65 | 77 | 71 | 90 | 67 | 82 | 19 | 31 | 52 |
Sample Output: 71, 67, 19, 31
Write a program to accept a name and total marks of N number of students in two single subscript array name[] and totalmarks[].
Calculate and print:
- The average of the total marks obtained by N Number of students.
[average = (sum of total marks of all the students)/N] - Deviation of each student’s total marks with the average
[deviation = total marks of a student – average]
Write a program in Java using arrays:
- To store the Roll No., Name and marks in six subjects for 100 students.
- Calculate the percentage of marks obtained by each candidate. The maximum marks in each subject are 100.
- Calculate the Grade as per the given criteria:
Percentage Marks Grade From 80 to 100 A From 60 to 79 B From 40 to 59 C Less than 40 D
Write a program to accept a list of 20 integers. Sort the first 10 numbers in ascending order and next the 10 numbers in descending order by using Bubble Sort technique. Finally, print the complete list of integers.
Hint: Class average is the average marks obtained by 40 students in a particular subject.
Write a program in Java to accept 20 numbers in a single dimensional array arr[20]. Transfer and store all the even numbers in an array even[ ] and all the odd numbers in another array odd[ ]. Finally, print the elements of both the arrays.
Write a program to store 20 numbers in a Single Dimensional Array (SDA). Now, display only those numbers that are perfect squares.
n[0] | n[1] | n[2] | n[3] | n[4] | n[5] | n[6] | n[7] | n[8] | n[9] |
12 | 45 | 49 | 78 | 64 | 77 | 81 | 99 | 45 | 33 |
Sample Output: 49, 64, 81
To get promotion in a Science stream, a student must pass in English and should pass in any of the two subjects (i.e., Physics, Chemistry or Maths). The passing mark in each subject is 35. Write a program in a Single Dimensional Array to accept the roll numbers and marks secured in the subjects for all the students. The program should check and display the roll numbers along with a message whether "Promotion is Granted" or "Promotion is not Granted". Assume that there are 40 students in the class.
The annual examination result of 50 students in a class is tabulated in a Single Dimensional Array (SDA) is as follows:
Roll No. | Subject A | Subject B | Subject C |
..................... | ..................... | ..................... | ..................... |
..................... | ..................... | ..................... | ..................... |
..................... | ..................... | ..................... | ..................... |
Write a program to read the data, calculate and display the following:
- Average marks obtained by each student.
- Print the roll number and the average marks of the students whose average is above 80.
- Print the roll number and the average marks of the students whose average is below 80.
Write a program to store 6 elements in an array P and 4 elements in an array Q. Now, produce a third array R, containing all the elements of array P and Q. Display the resultant array.
Input | Input | Output |
P[] | Q[] | R[] |
4 | 19 | 4 |
6 | 23 | 6 |
1 | 7 | 1 |
2 | 8 | 2 |
3 | 3 | |
10 | 10 | |
19 | ||
23 | ||
7 | ||
8 |
Write a program to accept the year of graduation from school as an integer value from the user. Using the binary search technique on the sorted array of integers given below, output the message "Record exists" if the value input is located in the array. If not, output the message "Record does not exist".
Sample Input:
n[0] | n[1] | n[2] | n[3] | n[4] | n[5] | n[6] | n[7] | n[8] | n[9] |
1982 | 1987 | 1993 | 1996 | 1999 | 2003 | 2006 | 2007 | 2009 | 2010 |
Write a program to input and store roll numbers, names and marks in 3 subjects of n number students in five single dimensional array and display the remark based on average marks as given below : (The maximum marks in the subject are 100).
Average marks = `"Total marks"/3`
Average marks | Remark |
85 - 100 | Excellent |
75 - 84 | Distinction |
60 - 74 | First-class |
40 - 59 | Pass |
Less than 40 | Poor |
A double dimensional array is defined as N[4][4] to store numbers. Write a program to find the sum of all even numbers and product of all odd numbers of the elements stored in Double Dimensional Array (DDA).
12 | 10 | 15 | 17 |
30 | 11 | 32 | 71 |
17 | 14 | 29 | 31 |
41 | 33 | 40 | 51 |
Sample Output:
Sum of all even numbers:...........
Sum of all odd numbers:...........
A Departmental Shop has 5 stores and 6 departments. The monthly sale of the department is kept in the Double Dimensional Array (DDA) as m[5][6].
The Manager of the shop wants to know the total monthly sale of each store and each department at any time. Write a program to perform the given task.
Hint: Number of stores as rows and Number of departments as columns.
A Metropolitan Hotel has 5 floors and 10 rooms in each floor. The names of the visitors are entered in a Double Dimensional Array (DDA) as M[S][10].
The Hotel Manager wants to know from the "Enquiry" about the position of a visitor (i.e. floor number and room number) as soon as he enters the name of the visitor. Write a program in Java to perform the above task.
A Class Teacher wants to keep the records of 40 students of her class along with their names and marks obtained in English, Hindi, Maths, Science and Computer Science in a Double Dimensional Array (DDA) as M[40][5].
When the teacher enters the name of a student as an input, the program must display the name, marks obtained in the 5 subjects and the total. Write a program in Java to perform the task.
If arrays Mand M + N are as shown below, write a program in Java to find the array N.
M = `[(-1, 0, 2),(-3, -1, 6),(4, 3, -1)]` M + N = `[(-6, 9, 4),(4, 5, 0),(1, -2, -3)]`
Solutions for 3: Arrays (Single Dimensional and Double Dimensional)
![Avichal solutions for Computer Applications [English] Class 10 ICSE chapter 3 - Arrays (Single Dimensional and Double Dimensional) Avichal solutions for Computer Applications [English] Class 10 ICSE chapter 3 - Arrays (Single Dimensional and Double Dimensional) - Shaalaa.com](/images/computer-applications-english-class-10-icse_6:1e1eb1b47d2b4696b609e5cd9260118f.jpg)
Avichal solutions for Computer Applications [English] Class 10 ICSE chapter 3 - Arrays (Single Dimensional and Double Dimensional)
Shaalaa.com has the CISCE Mathematics Computer Applications [English] Class 10 ICSE CISCE solutions in a manner that help students grasp basic concepts better and faster. The detailed, step-by-step solutions will help you understand the concepts better and clarify any confusion. Avichal solutions for Mathematics Computer Applications [English] Class 10 ICSE CISCE 3 (Arrays (Single Dimensional and Double Dimensional)) include all questions with answers and detailed explanations. This will clear students' doubts about questions and improve their application skills while preparing for board exams.
Further, we at Shaalaa.com provide such solutions so students can prepare for written exams. Avichal textbook solutions can be a core help for self-study and provide excellent self-help guidance for students.
Concepts covered in Computer Applications [English] Class 10 ICSE chapter 3 Arrays (Single Dimensional and Double Dimensional) are Need of Using an Array, Assigning Data in a 1 D Array, Basic Operations on Arrays, Single Dimensional Array, Double Dimensional Array, Introduction of Arrays (Single Dimensional and Double Dimensional), Assigning Data in 2 D Array.
Using Avichal Computer Applications [English] Class 10 ICSE solutions Arrays (Single Dimensional and Double Dimensional) exercise by students is an easy way to prepare for the exams, as they involve solutions arranged chapter-wise and also page-wise. The questions involved in Avichal Solutions are essential questions that can be asked in the final exam. Maximum CISCE Computer Applications [English] Class 10 ICSE students prefer Avichal Textbook Solutions to score more in exams.
Get the free view of Chapter 3, Arrays (Single Dimensional and Double Dimensional) Computer Applications [English] Class 10 ICSE additional questions for Mathematics Computer Applications [English] Class 10 ICSE CISCE, and you can use Shaalaa.com to keep it handy for your exam preparation.