0% found this document useful (0 votes)
31 views7 pages

Grade 10 ComputerApplications FA1 PP2 2025-26 AK

This document is a formative assessment paper for Grade X in Computer Applications, consisting of multiple-choice questions and programming tasks. It includes two sections: Section A with 20 marks for all questions and Section B with 30 marks for any two questions. The assessment covers topics such as string manipulation, character frequency, and programming in Java.

Uploaded by

2zc8frhvkt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views7 pages

Grade 10 ComputerApplications FA1 PP2 2025-26 AK

This document is a formative assessment paper for Grade X in Computer Applications, consisting of multiple-choice questions and programming tasks. It includes two sections: Section A with 20 marks for all questions and Section B with 30 marks for any two questions. The assessment covers topics such as string manipulation, character frequency, and programming in Java.

Uploaded by

2zc8frhvkt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

COMPUTER APPLICATIONS

(One hour)
Formative Assessment – 1, 2025-26
GRADE: X Max. Marks: 50

Answers to this Paper must be written on the paper provided separately.


You will not be allowed to write during the first 10 minutes.
This time is to be spent in reading the Question Paper.
The time given at the head of this Paper is the time allowed for writing the
answers.
________________________________________________________________________
Attempt all questions from Section A and any two questions from Section B.
The intended marks for questions or parts of questions, are given in brackets [ ].
_______________________________________________________________________
SECTION A (20 Marks)
Attempt all questions from this Section

Question 1
Choose the correct option: [10]
(i) Pick the odd one out
a. charAt( )
b. isUpperCase( )
c. startsWith( )
d. equals( )
(ii) Identify punctuator from the below example :
b = e + f * 20;
a. ;
b. *
c. +
d. =
(iii) Which of the following is an invalid literal ?

ICSE This Paper consists of 7 printed pages Turn over


1. “763” 2. 25D 3. ‘LION’ 4. ‘\0’
a. 1 and 2
b. Only 2
c. Only 3
d. 3 and 4
(iv) The replace( ) function requires at least ________ parameters.
a. 0
b. 1
c. 2
d. 3
(v) Which of the following is a valid Integer constant:
1. 4 2. 4.0 3. 4.3f 4. “four”
a. Only 1.
b. 1. and 3.
c. 2. and 4.
d. 1. and 2.
(vi) Give the output of the following code:
String A ="26", B="74";
double C= Double.parseDouble(A);
double D = Double.parseDouble(B);
System.out.println((C+D));
a. 26
b. 74
c. 100
d. 100.0
(vii) The output of the function "COMPOSITION".substring(3, 6); is
a. POSI
b. POS
c. MPO
d. MPOS

ICSE 2
(viii) ________ is a name given to variable, method, class, package
a. Keyword
b. Operator
c. Identifier
d. Literal
(ix) What will be the output of
System.out.println(Integer.valueOf(”a”));
a. 65
b. a
c. 97
d. NumberFormatException

(x) Assertion (A) : Implicit type conversion automatically converts the smaller
datatype to appropriate larger datatype needed in the expression.
Reason (R) : No data loss can occur in implicit type casting.
a. Both assertion(A) and Reason(R) are correct and Reason (R) is
correct explanation of Assertion.
b. Both assertion(A) and Reason(R) are correct but Reason (R) is not
the correct explanation of Assertion.
c. Assertion (A) is true Reason(R ) is false.
d. Assertion (A) is false Reason(R ) is true.
Question 2 Answer the following

(i) State the method that: [2]


a) converts a String to a primitive float data type.
b) checks if the entered character is space, tab or newline
Ans:
(a) Float.parseFloat(String) / Float.valueOf(String)
(b) Character.isWhitespace(char)
(ii) Differentiate between [2]

ICSE 3 Turn over


Character.toUpperCase(‘x’) and “Hello”.toUpperCase() methods.
Ans : Character.toUpperCase(‘x’) – is a character class method. Has a
character passing into it. Returns a character value.
“Hello”.toUpperCase() – is a String class method. It is called by string
object. It returns a String value.
(iii) Give the output of : [2]
System.out.println("Add:" + 2 + 2);
System.out.println("Add :" +(2 + 2));
Solution Add:22
Add :4
(iv) Write a statement each to perform the following task on a string: [2]
a) Extract the second last character of a word stored in the variable wd.
Ans: char ch=wd.charAt(wd.length()-2);
b) Check if the second character of a string str is in uppercase.
Ans: if(Character.isUpperCase(str.charAt(1));

(v) What is Autoboxing? Give an example. [2]


Ans: Converting a primitive data to wrapper class object is known as
autoboxing.
Ex: int x=10;
Integer obj = new Integer(x);

SECTION B (30 Marks)


Attempt any 2 questions from this section

Question 3 [15]
Define a class to input a string and convert it into uppercase and print the pair of
vowels and number of pair of vowels occurring in the string.
Example:
Input:
“BEAUTIFUL BUTTERFLIES”
Output: EA, AU, IE

ICSE 4
No. of pair of vowels: 3
Ans:
import java.util.Scanner;
class DoubleLetter
{
public static void main(String args[])
{
Scanner SC= new Scanner(System.in);
String input;
char ch1,ch2;
int i,l,c=0;
System.out.println("Enter a String:");
input= SC.nextLine();
input= input.toUpperCase();
l =input.length();
for(i=0;i<l-1;i++)
{
ch1=input.charAt(i);
ch2= input.charAt(i+1);
if("AEIOU".indexOf(ch1)>=0 && "AEIOU".indexOf(ch2)>=0)
{ System.out.println(ch1+ch2);
c++; }
}
System.out.println("No of pairs of vowels="+c);
}

Question 4 [15]
Write a program in java to input 10 characters and find the frequency of uppercase
and lowercase characters separately and concatenate only those characters which are
either a letter or a digit
For example:
Input: A, #, 1, b, c, d, E, F, %, H
Output:
Uppercase Frequency: 4
Lowercase Frequency: 3
Concatenated String : #1%

ICSE 5 Turn over


Ans:
import java.util.Scanner;
class UpLoSp
{
public static void main(String args[])
{
Scanner SC= new Scanner(System.in);
String input,ns="";
char ch1;
int i,l,sp=0,up=0,lo=0;;
System.out.println("Enter a String:");
input= SC.nextLine();
l =input.length();
for(i=0;i<l;i++)
{
ch1=input.charAt(i);
if(Character.isUpperCase(ch1))
up++;
else
if(Character.isLowerCase(ch1))
lo++;
else ns=ns+ch1;
}
System.out.println("UpperCase Frequncy"+up);
System.out.println("LowerCase Frequncy"+lo);
System.out.println("Concatenated String :"+ ns);
}
}

Question 5 [15]
Write a program to accept a sentence and print only the first letter of each word of the
sentence in capital letters separated by a full stop.
Example :
Input : “This is a cat”
Output : T.I.A.C.

Ans:
import java.util.Scanner;
public class Prog5 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);

ICSE 6
System.out.print("Enter a sentence: ");
String sentence = sc.nextLine();

String result = "";


sentence = sentence.toUpperCase();

result += sentence.charAt(0) + ".";

for (int i = 1; i < sentence.length(); i++) {


if (sentence.charAt(i) == ' ') {
result += sentence.charAt(i + 1) + ".";

}
}

System.out.println(result);

}
}

************************

ICSE 7 Turn over

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy