Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Vs.

Write a
program in Java to accept a name(Containing three words) and Displavoml
the initials (i.e., first letter of each word). only
Sample Input: LAL KRISHNA ADVANI
Sample output: L KA
4 Write a nrooram in laxra to accAnt o name containina throA uzardo and J
Write a program in Java to accept a String in upper case and replace all the vowes
present in the String with Asterisk (*) sign.
3) Sample Input: "TATA STEEL IS IN JAMSHEDPUR"
Sample output: T*T* ST**L *S *N JMSH*DP*R
ard b z ioining all the fis
rite a program to accept a word and convert it into lower if it in upper case
case, is

Display the new word by replacing only the vowels with the letter following it.
Sample Input: computer
Sample Output: cpmpvtfr [ICSE 2011]
6. JWrite a program to inputsentence. Count and
a
display the frequency of each letter
of the sentence in alphabetical order.
Sample Input: COMPUTER APPLICATIONS ICSE 2010
Sample Output:
Character Frequency Character FrequencyY
A 2 O 2
P 3
C 2
I 1 R

L 2 S
T
M
1
U
N
case letters. Count
into upper
Convert the string
ite program to accept a string. that exist in
the string
string.
sequences
double letter AN APPLE"
and u
output the
p u t the
number of LITTLE
RABBIT WITH

31 FEEDING
THE [ICSE 2012]
Sample Input:
ut: "SHE WAS

Sample Output: 4
8 . Special words are those words which start and end with the sanme letter.

Example: EXISTENCE, COMIC, WINDOw


3 Palindrome words are those words which read the same from
m left
left to
to right
right ands
and vie
versa.

Example: MALYALAM, MADAM, LEVEL,


ROTATOR, CIVIC
are not palindromes
All palindromes are special words but all special words
whether the word is a palindrom
Write a program to accept a word. Check and display
word o r n o n e of them.
ICSE 201
or only a special
ert e sentence into upper case letters
to generate a
triangle or an inverted triangle till n terms based upen
D 22Write a program
the User's choice of the triangle to be displayed. ICSE Model
3 Example 1: Example 2:
Input: Type 1 for a triangle and Input: Type 1 for a triangle and
Type 2 for an inverted triangle Type 2 for an inverted triangle of alphabets
Enter your choice 1 Enter your choice 2
Enter the number of terms 5 Enter the number of terms 5
Sample Output: Sample Output:
*****
ABCDE
ABCD
ABC
AB
*
A
27Write a program to input twenty names in an array. Arrange
these names in ascending

order of letters, using the bubble sort technique. [ICSE 2015]


4O) Sample Input: Rishi, Piyush, Deepak, Abhishek, Kunal
Rohit, Devesh, Indrani, Shivangi, Himanshu,
Sample Output: Rishi, Rohit, Shivangi
Himanshu, Indrani, Kunal, Piyush,
Abhishek, Deepak, Devesh, Sinale Dimensional Arrav

You might also like