English

Avichal solutions for Computer Applications [English] Class 10 ICSE chapter 3 - Arrays (Single Dimensional and Double Dimensional) [Latest edition]

Advertisements

Chapters

Avichal solutions for Computer Applications [English] Class 10 ICSE chapter 3 - Arrays (Single Dimensional and Double Dimensional) - Shaalaa.com
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.


Review InsightEXERCISES
Review Insight [Pages 236 - 237]

Avichal solutions for Computer Applications [English] Class 10 ICSE 3 Arrays (Single Dimensional and Double Dimensional) Review Insight [Pages 236 - 237]

Review Insight | Q 1. | Page 236

What is meant by direct initialization of an array? 

Review Insight | Q 2. | Page 236

What is meant by the subscript of an array? 

Review Insight | Q 3. | Page 236

Name a technique that can be used to concatenate (join) the elements of two different arrays into a single array. 

Review Insight | Q 4. | Page 236

Differentiate between the following:

length and length()

Review Insight | Q 5. | Page 236

What is the difference between the linear search and the binary search technique?

Review Insight | Q 6. (i) | Page 236

State the total size in bytes of the array a[4] of char data.

Review Insight | Q 6. (ii) | Page 236

State the total size in bytes of the array p[4] of float data type.

Review Insight | Q 7. (i) | Page 236

What is Array?

Review Insight | Q 7. (ii) | Page 236

Write a statement to declare an integer array of 10 elements. 

Review Insight | Q 8. (a) | Page 236

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.

Review Insight | Q 8. (b) | Page 236

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. 

Review Insight | Q 9. | Page 236

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]); 

Review Insight | Q 10. | Page 237

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;

Review Insight | Q 11. | Page 237

What will this code print?

int arr[] = new int[5];
System.out.println(arr);
  • 0

  • value stored in arr[0]

  • 0000

  • Garbage value

Review Insight | Q 12. | Page 237

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):

Review Insight | Q 13. | Page 237

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:

  1. What keyword / expression will be filled in place of ?1?
  2. What keyword / expression will be filled in place of ?2?
  3. What keyword / expression will be filled in place of ?3?
  4. What keyword / expression will be filled in place of ?4?
EXERCISES [Pages 238 - 243]

Avichal solutions for Computer Applications [English] Class 10 ICSE 3 Arrays (Single Dimensional and Double Dimensional) EXERCISES [Pages 238 - 243]

Multiple Choice Questions:

EXERCISES | Q I. 1. | Page 238

Which of the following is the correct usage? 

  • int a[−40] 

  • int a[40]

  • float a[0 − 40]

  • None

EXERCISES | Q I. 2. | Page 238

Which element is represented by a[10]? 

  • 10th

  • 9th

  • 11th

  • None

EXERCISES | Q I. 3. | Page 238

Cell numbers of a dimensional array are also known as ______. 

  • Packets

  • Blocks

  • Subscripts

  • Compartments

EXERCISES | Q I. 4. | Page 238

A dimensional array is also known as ______. 

  • Subscripted variable

  • Actual variable

  • Compound variable

  • None

EXERCISES | Q I. 5. | Page 238

An array element can be accessed through ______.

  • Dots

  • Element name

  • Index number

  • None

EXERCISES | Q I. 6. | Page 238

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

EXERCISES | Q I. 7. | Page 238

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]

EXERCISES | Q I. 8. | Page 238

The elements of array[50] are numbered: 

  • From 1 to 50

  • From 0 to 49

  • From 1 to 51

  • None

EXERCISES | Q I. 9. | Page 238

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

EXERCISES | Q I. 10. | Page 238

A Single Dimensional array contains N elements. What will be the last subscript? 

  • N−1

  • N

  • N+1

  • None

Fill in the blanks:

EXERCISES | Q II. 1. | Page 238

Each element of a single dimensional array is accessed using variable along with ______ enclosed within square bracket. 

EXERCISES | Q II. 2. | Page 238

A double dimensional array uses ______ type of indices.

EXERCISES | Q II. 3. | Page 238

To access the elements in reverse order, the single dimensional array is traversed starting with ______ index.

EXERCISES | Q II. 4. | Page 238

Complete the following statement:

int ______ = ______ int a[15]

EXERCISES | Q II. 5. | Page 238

The last index of a single dimensional array will be ______, if it is declared to store 8 elements.

EXERCISES | Q III. 1. | Page 239

Give the output of the following program snippet:

int m[ ] = {2, 4, 6, 8}; 
System.out.println(m[1] + ' ' + m[2]); 
EXERCISES | Q III. 2. | Page 239

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);
EXERCISES | Q III. 3. | Page 239

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]);
EXERCISES | Q III. 4. | Page 239

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:

EXERCISES | Q IV. | Page 239

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:

  1. What is the term used for a common variable storing a number of similar data?
    1. Numeric variable
    2. Static variable
    3. Subscripted variable
    4. Local variable
  2. Which of the following techniques is used for searching an element by dividing the sorted list of elements into two halves in each iteration?
    1. Liner search
    2. Binary search
    3. Sequential search
    4. None of the above
  3. Which of the following sorting techniques finds the lowest element in each pass and places it in appropriate position?
    1. Selection sort
    2. Binary sort
    3. Bubble sort
    4. Insertion sort
  4. Which of the following term is used for joining two or more arrays to form a single array?
    1. Joining
    2. Collecting
    3. Merging
    4. Sorting

Write short answers:

EXERCISES | Q V. 1. | Page 239

What is meant by Dimensional Array? 

EXERCISES | Q V. 2. | Page 239

Name the two types of Dimensional Array. 

EXERCISES | Q V. 3. | Page 239

What is the need of Dimensional Array? Explain.

EXERCISES | Q V. 4. | Page 239

'Array is a composite data type'. Explain this statement.

EXERCISES | Q V. 5. (a) | Page 239

Define the following with its construct:

Single Dimensional Array

EXERCISES | Q V. 5. (b) | Page 239

Define the following with its construct:

Double Dimensional Array

EXERCISES | Q VI. 1. | Page 240

Differentiate between the following:

Subscript and Subscripted variable.

EXERCISES | Q VI. 2. | Page 240

Differentiate between the following:

Char a[5] and int a[5] 

EXERCISES | Q VI. 3. | Page 240

Differentiate between the following:

Ordinary variable and array variable.

EXERCISES | Q VI. 4. | Page 240

Differentiate between the following:

String a[5] and String a[]

EXERCISES | Q VI. 5. | Page 240

Differentiate between searching and sorting.

EXERCISES | Q VI. 6. | Page 240

What is the difference between the linear search and the binary search technique?

EXERCISES | Q VI. 7. | Page 240

Differentiate between the following:

Sequential sort and Bubble sort.

EXERCISES | Q VI. 8. | Page 240

Differentiate between the following:

length and length()

Unsolved Programs on Single and Double Dimensional Arrays:

EXERCISES | Q VII. 1. | Page 240

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.

EXERCISES | Q VII. 2. | Page 240

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` 

EXERCISES | Q VII. 3. | Page 240

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 

EXERCISES | Q VII. 4. | Page 240

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

EXERCISES | Q VII. 5. | Page 240

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:

  1. The average of the total marks obtained by N Number of students.
    [average = (sum of total marks of all the students)/N]
  2. Deviation of each student’s total marks with the average
    [deviation = total marks of a student – average] 
EXERCISES | Q VII. 6. | Page 240

Write a program in Java using arrays:

  1. To store the Roll No., Name and marks in six subjects for 100 students.
  2. Calculate the percentage of marks obtained by each candidate. The maximum marks in each subject are 100.
  3. 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
EXERCISES | Q VII. 7. | Page 241

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. 

EXERCISES | Q VII. 8. | Page 241

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. 

EXERCISES | Q VII. 9. | Page 241

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 

EXERCISES | Q VII. 10. | Page 241

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. 

EXERCISES | Q VII. 11. | Page 241

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:

  1. Average marks obtained by each student.
  2. Print the roll number and the average marks of the students whose average is above 80.
  3. Print the roll number and the average marks of the students whose average is below 80.
EXERCISES | Q VII. 12. | Page 242

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
EXERCISES | Q VII. 13. | Page 242

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
EXERCISES | Q VII. 14. | Page 242

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
EXERCISES | Q VII. 15. | Page 242

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:...........

EXERCISES | Q VII. 16. | Page 243

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. 

EXERCISES | Q VII. 17. | Page 243

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. 

EXERCISES | Q VII. 18. | Page 243

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.  

EXERCISES | Q VII. 19. | Page 243

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)

Review InsightEXERCISES
Avichal solutions for Computer Applications [English] Class 10 ICSE chapter 3 - Arrays (Single Dimensional and Double Dimensional) - Shaalaa.com

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.

Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×