Search Header Logo

Grade 10 Computer Application String Handling

Authored by Namrata Boob

others

Used 5+ times

Grade 10 Computer Application String Handling
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

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

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?