Grade 10 Computer Application String Handling

Grade 10 Computer Application String Handling

10 Qs

quiz-placeholder

Similar activities

Quizathon 9

Quizathon 9

University

15 Qs

Java Refresher

Java Refresher

KG - University

11 Qs

Basic Python

Basic Python

KG - University

7 Qs

One-Dimensional Array

One-Dimensional Array

KG - University

10 Qs

L1 Python Recall - Do Now

L1 Python Recall - Do Now

KG - University

8 Qs

DSD QUIZZ 2 2023 Batch

DSD QUIZZ 2 2023 Batch

KG - University

10 Qs

Quiz 7

Quiz 7

KG - University

12 Qs

Python

Python

KG - University

15 Qs

Grade 10 Computer Application String Handling

Grade 10 Computer Application String Handling

Assessment

Quiz

others

Easy

Created by

Namrata Boob

Used 5+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

1.Give the output of the following program fragment:String s=new String(“He went to the market”);String r; r=s.replace(“went”,“is going”); System.out.println(r);
He is going to the market
He is going to the mall

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

2. What will be the output for the following program segment?String s = new String(“abc”);System.out.println(s.toUpperCase());
AbC
ABC

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

3. What will be the output of the following code?char x = ‘A’; int m;m=(x= =’a’) ? ‘A’ : ‘a’;System.out.println(“m=”+m);
79
97

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

4. Write a statement each to perform the following task on a string:-Find and display the position of the last space in a string s.
System.out.println(s.lastIndexOf(“ ”));
double d=Double.parseDouble(x);

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

5. Write a statement each to perform the following task on a string:-Convert a number stored in a string variable x to double data type
System.out.println(s.lastIndexOf(“ ”));
double d=Double.parseDouble(x);

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

6.Give the output of the following string functions:-(ii) “DEDICATE”.compareTo(“DEVOTE”)
-81
-18

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

7. Consider the following String array and give the output:String arr[]={“DELHI”, “CHENNAI”, “MUMBAI”, “LUCKNOW”, “JAIPUR”};System.out.print(arr[0].length()>arr[3].length());System.out.print(arr[4].substring(0,3));
false JAI
false jai

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?