String handling

Class 10 Computer Applications Chapter 8
String handling
Important Questions

Exam preparation with oswal.ioExam preparation with oswal.io

Here are class 10 String handling important questions and answers. Meticulously designed, these questions aim to fortify students' understanding of fundamental concepts related to string manipulation. Embracing various question formats, these exercises focus on reinforcing core principles, addressing uncertainties, and sharpening problem-solving abilities. Through active engagement with these important questions for class 10 computer ICSE students can fortify their exam preparation, boost confidence, and polish essential proficiencies crucial for excelling in the ICSE Class 10 Computer Applications Examination.

Introduction

Chapter 8 of Class 10 Computer Applications delves into the fascinating realm of String Handling. Strings are sequences of characters, and this chapter focuses on understanding how to manipulate and work with these sequences effectively in computer programs. Students will explore various operations that can be performed on strings, including concatenation, comparison, accessing individual characters, finding the length, and more. Solving String handling ICSE class 10 computer important questions will help students understand the concepts better.

What are String handling?

String handling refers to the manipulation and management of sequences of characters, known as strings, within computer programs. These strings represent textual data and can include letters, numbers, symbols, and whitespace. In programming, understanding string handling involves mastering various operations that can be performed on strings.  Solving  important questions for class 10 ICSE String handling  essential for a comprehensive understanding and successful examination preparation. Explore further with oswal.io  for ICSE class 10 important questions 2023-24  to strengthen your knowledge in these fundamental areas of computer.

important questions for class 10 computer icse

Class 10 String handling Important Questions and Answers

Q1. Given a string str=CompuTerScieNceand
ENGINEERING”; The output of str.substring(5,12) will return ______ characters

Options

(a) 6
(b) 7
(c) 8
(d) 9

Ans. ()

Explanation:
str.substring(5,12) returns characters from index 5 to 11 which are 7 characters.

Q2. The following code will produce output as :
public class Exam
{
      public static void main(String[] args)
      {
            String s="ICSE2021";
            system.out.println
(s.substring(4)+s.length());
      }
}

Options

(a) 20218
(b) 2029
(c) Error
(d) 2030

Ans. (a) 20218
Explanation:
substring(4) returns characters from index 4 to the end, that is “2021” and length() function returns the length() of the string that is 8. Concatenation of the two gives 20218.

Q3. How can string be created by two methods ?

Explanation:
String can be created by two methods :
(i) From string literal :
e.g. : String str = “Welcome”;
(ii) Using new keyword :
e.g. : char.str[] = {‘w’, ‘e’, ‘I, ‘c’,‘o‘, ‘m’, ‘e’};
String str1 = newString(str);
System.out.println(str1);

Q4.  Write the return data type of the following functions :
(i) startsWith( )
(ii) random( )

Explanation:
(i) boolean
(ii) double

Q5. Design a class to accept a string (one word) and convert it into uppercase. Now check and print if it is a ‘No vowel’ word or not. A word is a ‘No vowel’ word, if it does not contain any vowel in it.
Input: rhythm
Output: RHYTHM
No Vowel word

Explanation:
import java.util.*;
public class Replace
{
public static void main(String args [ ])
{
Scanner sc = new Scanner(System.in);
String name;
int l, i, b, w;
l= 0;
b = 0; w = 0;
char chr; System.out.println(“Enter a String’’);
name = sc.nextLine();
l= name.length();
for(i = 0; i < l; i++) // Loop begins{chr = name.charAt(i);
if(chr = = ‘e’)chr = ‘*’;
System.out.print(chr);
}
// Loop ends
}
}

important questions for class 10 computer icseimportant questions for class 10 computer icse

ICSE Class 10 Computer Applications Chapter wise Important Questions

Chapter 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

Conclusion

Chapter 8 on String Handling in Class 10 Computer Applications marks a pivotal exploration into the world of textual manipulation within programming. Through this chapter, students have delved into the intricacies of working with strings, mastering operations like concatenation, comparison, accessing characters, and understanding the length of strings. If you are looking to further practice and enhance your understanding of the concepts discussed in the chapter, oswal.io provides a comprehensive set of class 10 String handling important questions and answers for understanding the concept in a better way.

Frequently Asked Questions

Q1 : What operations can be performed on strings?

Ans: Strings support various operations, including concatenation (joining strings together), finding the length of a string, accessing individual characters within a string, searching for substrings, comparing strings, and manipulating their content.

Q2 : Can you modify a string once it's created?

Ans:  In many programming languages, strings are immutable, meaning their contents cannot be changed after creation. However, new strings can be created by modifying or combining existing strings.

Q3 : What is string concatenation?

Ans: String concatenation is the process of combining two or more strings into a single string. This operation is often performed using concatenation operators or functions specific to the programming language.

Q4 : Are there operations to search for or manipulate specific parts of a string?

Ans: Yes, strings typically offer methods or functions to search for substrings within a string, extract portions of a string (substring extraction), replace specific characters or substrings, and convert case (uppercase/lowercase) among other manipulations.

Q5 : What is a string in programming?

Ans: A string in programming is a sequence of characters, such as letters, numbers, symbols, or whitespace, enclosed within single or double quotes. It represents textual data and is a fundamental data type in many programming languages.

Copyright 2022 OSWAL PUBLISHERS Simplifying Exams
Phone:  (+91) 78959 87722
Mail: support@oswalpublishers.in

Company

Our Policy

  • Privacy policy
  • Terms & Conditions
Follow Us
facebook icontwitter iconInstagram iconyoutube iconlinkedIn iconwhatsapp icon

Lets Connect

©Copyright 2022 OSWAL PUBLISHERS Simplifying Exams
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.