Home / Board / ICSE / important Questions / Class 10 / Computer Application / Arrays
Table of Contents
Ans. (a) Private
Explanation:
In a Binary search the middle index is found and the array is divided into two halves to search for an element.
Ans. (b) 202
Explanation:
marr[-1+2] is marr[1] which is the element at index 1 , that is 202.
Explanation:
For array, length is a property so we use char.length to get the length of a char array and for a string object, length is a function so we use str.length().
Explanation:
a[4] will occupy 2 * 4 = 8 Bytes.
p[4] will occupy 4 * 4 = 16 Bytes.
Explanation:
import java.util.*;
class Student
{
public static void main(String args[])
{
Scanner s = new Scanner(System.in);
String[] name = new String[35];
int[] percent = new int[35];
System.out.println(“Please enter name and percentage of 35 students”);
for(int i = 0; i < 35; i++)
{
name[i] = s1.nextLine();
percent[i] = s1.nextInt()
}
int index;
int small, temppercent;
String tempname;
for(int a = 0; a < 34; a++)
{
for (int b = 0; b percent[b+1])
{
temppercent = percent[b];
percent[b] = percent[b+1];
percent[b+1] = temppercent;
tempname = name[b];
name[b] = name[b+1];
name[b+1] = tempname;
}
}
}
int pos = 1;
System.out.println(“First 10 toppers of the class”);
for(int i = 34; i >= 25; i –)
{
System.out.println(“Position:”+pos);
System.out.println(“Name:”+ name[i]);
System.out.println(“Percentage marks:”+ percent[i]);
pos++;
}
}
}
Download Mind Map of this chapter
Download NowWant to Practice Mock Tests of this chapter
Practice NowDownload Important Questions of this chapter
Download NowChapter No. | Chapter Name |
---|---|
Chapter 1 | Revision of Class IX Syllabus |
Chapter 2 | Class as a Basis of all Computation |
Chapter 3 | User - defined Methods |
Chapter 4 | Constructors |
Chapter 5 | Library classes |
Chapter 6 | Encapsulation |
Chapter 7 | Arrays |
Chapter 8 | String handling |
Chapter Wise Important Questions for ICSE Board Class 10 Computer Applications |
---|
Revision of Class IX Syllabus |
Class as a Basis of all Computation |
User - defined Methods |
Constructors |
Library classes |
Encapsulation |
Arrays |
String handling |
CBSE Important Questions Class 9
CBSE Important Questions Class 10
CBSE Important Questions Class 12
CBSE Practice Papers
CBSE Practice Papers
ICSE Important Questions Class 9
ICSE Important Questions Class 10
ICSE Practice Papers
ISC Important Questions Class 12
ISC Practice Papers
Contact Us
© Copyright 2024 oswal.io by OSWAL PUBLISHERS Simplifying Exams