मराठी

Rupa Pandit solutions for कम्प्युटर एपलीकेशंस [इंग्रजी] इयत्ता १० आयसीएसई chapter 8 - String Handling [Latest edition]

Advertisements

Chapters

Rupa Pandit solutions for कम्प्युटर एपलीकेशंस [इंग्रजी] इयत्ता १० आयसीएसई chapter 8 - String Handling - Shaalaa.com
Advertisements

Solutions for Chapter 8: String Handling

Below listed, you can find solutions for Chapter 8 of CISCE Rupa Pandit for कम्प्युटर एपलीकेशंस [इंग्रजी] इयत्ता १० आयसीएसई.


Exercises
Exercises [Pages 245 - 249]

Rupa Pandit solutions for कम्प्युटर एपलीकेशंस [इंग्रजी] इयत्ता १० आयसीएसई 8 String Handling Exercises [Pages 245 - 249]

Choose the correct option.

1. (i)Page 245

Given that:

m = "reason".length();

What will be the value of m?

  • 66

  • 5

  • 4

  • 3

1. (ii)Page 245

Given that:

String xa = "active" ; String xb = "passive";

int ct = xa.compareTo(xb);

What will be the value of ct?

  • 15

  • 14

  • −14

  • −15

1. (iii)Page 245

Given that:

String kr = "Albert Einstein";

int pr = kr.indexOf('e');

What will be the value of pr?

  • 4

  • 3

  • 12

  • 13

1. (iv)Page 245

Given that

String hh = "Isaac Newton was a great scientist"; 

char pp = hh.charAt(7);

What will be the value in pp?

  • N

  • w

  • e

  • t

1. (v)Page 245

Given that:

String sp = "Spectroscорy";

String sq = sp.substring(8);

What will be the value of sq?

  • scopy

  • copy

  • opy

  • Error

1. (vi)Page 245

Given that:

String wt = "TELL ME WHEN WILL YOU COME?";

String wu = wt.replace('E', 'A'); 

How many replacements will take place?

  • 4

  • 3

  • 2

  • 1

1. (vii)Page 245

Given that:

String pm = "Albert Einstein";

qm = pm.endsWith("in");

What is the datatype of qm?

  • int

  • char

  • String

  • boolean

1. (viii)Page 245

Given that:

String gk = "James Clerk Maxwell";

nk = gk.compareTolgnoreCase("k");

What will be the value of nk?

  • 1

  • 2

  • −1

  • −2

1. (ix)Page 246

Given that:

String ab = "Aaron Bernstein";

String db = ab.substring(ab.lastIndexOf('e');

What will be the length of db?

  • 8

  • 3

  • 2

  • 0

1. (x)Page 246

Given that:

String sb = "Satyendra Nath Bose";

String nb = ""+sb.charAt(0)+ sb.charAt(sb.indexOf(' ')+1) + sb.charAt(sb.lastIndexOf(' ')+1);

What will be the value of nb?

  • SNB

  • snb

  • ahe

  • Sat

1. (xi)Page 246

Predict the output of the following code snippet: String P = "20", Q = "22";

int a = Integer.parseInt(P);

int b = Integer.value0f(Q);

System.out.println(a + " " + b);

  • 20

  • 2220

  • 20 22

  • 22

1. (xii)Page 246

The String class method to join two strings is ______.

  • concat(String)

  • <string>.joint(string)

  • concat(char)

  • Concat()

1. (xiii)Page 246

The output of the function "COMPOSITION". substring(3, 6):

  • POST

  • MPO

  • POS

  • MPOS

Answer the following in brief.

2. (a)Page 246

What is the use of library classes?

2. (b)Page 246

Which keyword is used to access members of another package?

2. (c) iPage 246

Is String a primitive?

2. (c) iiPage 246

What is a string made up of?

2. (d)Page 246

What is the index number of the first character of a string?

2. (e)Page 246

What does a package contain?

2. (f)Page 246

What is the use of the String Tokeniser class?

3. (a)Page 246

Write the output of the codes given below.

String s1 = "Stay Active"; String s2 = "Stay Creative";
String sst1 = s1.substring(5, 11);    String sst2 = s2.substring(5);
System.out.print("Always "+sst2+" and" +sst1);
3. (b)Page 246

Write the output of the codes given below.

String s1 = "RISTORANT";    String s2 = “VENEZUELA";
char c1 = s2.charAt(s1.indexOf('T'));   int n1 = s1.indexOf(s2.charAt(8));
System.out.print(" c1 =" +c1+ " and n1 ="+n1);
3. (c)Page 246

Write the output of the codes given below.

String sc = "CLOCК";     String st = "TIME";
int sclen = sc.length();
String p1 = st.substring(0, 2);   String p2 = sc.substring (3, sclen);
System.out.print(p1 + p2);
3. (d)Page 247

Write the output of the codes given below.

System.out.println("COMPUTER”".charAt(5));
System.out.println("COMPUTER".substring(5));
2. (e)Page 247

Write the output of the codes given below.

String ra ="Failure is not failing.";String rb ="Failure is, giving up.";
int p1 = ra.indexOf(′ b');     // b indicates one space   
String ca = ra.substring(0, p1);    boolean v = rb.startsWith(ca);
System.out.println(" ca = "+ ca);   System.out.println(" V =" +v);
2. (f)Page 247

Write the output of the codes given below.

String sa = "Success is a journey"; String sb = "It is not a destination";
int p1 = sa.lastIndexOf('b');    String ta = sa.substring (0, p1);
p1 = ta.lastIndexOf('b');        ta = ta.substring (0, p1);
int p2 = sb.indexOf ('b');     String tb = sb.substring (p2+1);
p2 = tb.indexOf('b');     tb = tb.substring (p2);
ta = ta.concat (tb); System.out.print("Finally we can say :: "+ta);
2. (g)Page 247

Write the output of the codes given below.

String na = "Failure is not, falling down";
String nb = "Failure is, not getting up";
int n1 = nb.lastIndexOf('ť');
String nt1 = na.substring(0, 7);
n1 = na.indexOf('');
String nt2 = nb.substring(n1 +1, 10);
Stringnt3=na.charAt(22)+"iv"+na.substring(na.lastIndexOf('1')+1, na.lastIndexOf('));
String nt4 = nb.substring(nb.lastIndexOf(' ') + 1);
String nt5 = nt1 +"" + nt2 +"" + nt3 +""+ nt4;
System.out.print(" Therefore: " + nt5);
3. (h)Page 247

Write the output of the codes given below.

String sp = "HOCKEY 12 CRICKET 100 FOOTBALL 4";
int r1 = Integer.valueOf(sp.substring(7,9)) + sp.indexOf('K');
System.out.println(" R1 = " + r1);
String sq = sp.replace('O', sp.charAt(4)); System.out.println(" SQ = " +sq);
int dif = sp.compareTo(sq); System.out.println(" DIF = " +dif);
3. (i)Page 247

Write the output of the codes given below.

String sw = “Pharaoh-Meant-King";
String sy = sw.substring(0, 5).toUpperCase();:
String sz = sw.substring(5).toLowerCase();
System.out.println(" SY = " + sy); System.out.println(" SZ = " + sz );
3. (j)Page 247

Write the output of the codes given below.

String ts = “ALL PROBLEMS SOLVED";
String rs = ts.substring(ts.indexOf('P'));
String vs = rs.substring(rs.lastIndexOf('S'));
ts = (ts.concat(vs)).concat(rs);
System.out.println(" TS = "+ ts);
3. (k)Page 248

Write the output of the codes given below.

System.out.println("M isUpperCase ::" + Character.isUpperCase('M');
System.out.println(“j toUpperCase ::" + Character.toUpperCase('j'));
System.out.println("+ isUpperCase ::" + Character.isUpperCase('+'));
System.out.println("? toUpperCase ::" + Character.toUpperCase('?'));
3. (l)Page 248

Write the output of the codes given below.

String at = "BANANA"; String ar = at.concat(at.replace ( 'N', 'T'));
System.out.println( “ AR :: " + ar );
3. (m)Page 248

Write the output of the codes given below.

String na = “9876543210"; String nb = "0123456789";
int nk1 = Integer.valueOf(String.valueOf(na.charAt(0)));
int nk2 = Integer.valueOf(nb.substring(1, 3));
int nk3 =nk1 * nk2;
System.out.println(" NK1 :: " + nk1);
System.out.println(" NK2 :: ” + nk2);
System.out.println(" NK3 :: " + nk3);
4. (a)Page 248

Write a program for the following.

Input two strings and verify whether they are same or not.

4. (b)Page 248

Write a program for the following.

Input a string (in lower case) and capitalise the 2nd letter of each word of the sentence.

4. (c)Page 248

Write a program for the following.

Input a string (in lower case) and convert only the vowels to upper case.

4. (d)Page 248

Write a program for the following.

Input a string and count the number of non alphabetic characters in it.

4. (e)Page 248

Write a program for the following.

Input a string and print the characters that are not alphabets followed by the alphabets in it.

3. (f)Page 248

Write a program for the following.

Input a String and change the text given by the user to title case. [avoid using method.toUpperCase()]

3. (g)Page 248

Write a program for the following.

Input a string and change the text given by the user to toggle case.

Example:

Input: "pACIFIC is DEEP"
Output: "Pacific IS deep"
3. (h)Page 248

Write a program for the following.

Input a string from the user and also two characters. Find the first character in the word and then replace it with the second character and display the new word after replacement.

Example:

Input:      
Word "CONSEQUENCES"; C1 = 'E'; C2 = 'O';
Output "CONSOQUONSOS"    
3. (i) (i)Page 249

Write a program for the following.

Input a string to display these patterns. Assume the string is "CALENDAR"

Calendar

Alendar

Lendar

Endar

Ndar

Dar

Ar

R

3. (i) (ii)Page 249

Write a program for the following.

Input a string to display these patterns. Assume the string is "CALENDAR"

Radnelac
Adnelac
Dnelac
Nelac
Elac
Lac
Ac
C
5.Page 249

Define a class to accept a string and convert it into uppercase. Count and display the number of vowels in it.

Input: robotics
Output: ROBOTICS
Number of vowels: 3
6. (a)Page 249

Give the output of the following String class method:

"COMMENCEMENT".lastIndexOf('M')
6. (b)Page 249

Give the output of the following String class method:

"devote". compareTo("DEVOTE")

Solutions for 8: String Handling

Exercises
Rupa Pandit solutions for कम्प्युटर एपलीकेशंस [इंग्रजी] इयत्ता १० आयसीएसई chapter 8 - String Handling - Shaalaa.com

Rupa Pandit solutions for कम्प्युटर एपलीकेशंस [इंग्रजी] इयत्ता १० आयसीएसई chapter 8 - String Handling

Shaalaa.com has the CISCE Mathematics कम्प्युटर एपलीकेशंस [इंग्रजी] इयत्ता १० आयसीएसई 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. Rupa Pandit solutions for Mathematics कम्प्युटर एपलीकेशंस [इंग्रजी] इयत्ता १० आयसीएसई CISCE 8 (String Handling) 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. Rupa Pandit textbook solutions can be a core help for self-study and provide excellent self-help guidance for students.

Concepts covered in कम्प्युटर एपलीकेशंस [इंग्रजी] इयत्ता १० आयसीएसई chapter 8 String Handling are .

Using Rupa Pandit कम्प्युटर एपलीकेशंस [इंग्रजी] इयत्ता १० आयसीएसई solutions String Handling 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 Rupa Pandit Solutions are essential questions that can be asked in the final exam. Maximum CISCE कम्प्युटर एपलीकेशंस [इंग्रजी] इयत्ता १० आयसीएसई students prefer Rupa Pandit Textbook Solutions to score more in exams.

Get the free view of Chapter 8, String Handling कम्प्युटर एपलीकेशंस [इंग्रजी] इयत्ता १० आयसीएसई additional questions for Mathematics कम्प्युटर एपलीकेशंस [इंग्रजी] इयत्ता १० आयसीएसई CISCE, and you can use Shaalaa.com to keep it handy for your exam preparation.

Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×