0% found this document useful (0 votes)
77 views3 pages

Record Program Set 2 (Class 10)

The document contains a series of programming exercises for Class 10 students, focusing on Java programming concepts. Each exercise includes a specific task, sample input, and expected output, covering topics such as string manipulation, array handling, and searching algorithms. The exercises aim to enhance students' coding skills through practical implementation of various programming techniques.
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)
77 views3 pages

Record Program Set 2 (Class 10)

The document contains a series of programming exercises for Class 10 students, focusing on Java programming concepts. Each exercise includes a specific task, sample input, and expected output, covering topics such as string manipulation, array handling, and searching algorithms. The exercises aim to enhance students' coding skills through practical implementation of various programming techniques.
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/ 3

HAL GNANAJYOTI SCHOOL

Class 10
Record programs set 2 (21 to 40)

21) Write a program in java to accept a string/word and display the new
string after removing all the vowels present in it.

Sample i/p: COMPUTER APPLICATIONS


Sample o/p: CMPTR PPLCTNS

22) Write a program in java to accept a name containing three words


and display the surname first followed by the first and middle names.

Sample i/p: MOHANDAS KARAMCHAND GANDHI


Sample o/p: GANDHI MOHANDAS KARAMCHAND

23) Write a program to accept a word and convert it to lower case and
display the letter with maximum ASCII value and also the letter with
minimum ASCII value.

Sample Input: computer


Sample Output: Character with minimum ASCII Value is: c
Character with maximum ASCII Value is: u

24) Write a program to accept a string. Convert the string to uppercase.


Count and output the number of double letter sequences that exists
in the string.

Sample Input: “SHE WAS FEEDING THE LITTLE RABBIT WITH AN


APPLE”
Sample Output: 4

25) Write a program to accept a string display whether the given string
is a palindrome or not.
Sample Input: Madam
Sample Output: The given string is a palindrome

Sample Input: computer


Sample Output: The given string is not a palindrome.

26) Write a program to input a word from the user and remove the
consecutive repeated characters by replacing the sequence of
repeated characters by its single occurrence

Sample Input: commpppuuutteerrr


Sample Output: computer

27) Write a program to input a sentence and print the number of


characters found in the longest word of the given sentence.

For example if S=" India is my country " then the output should be
7.

28) Write a program in Java to accept a string in lower case and change
the first letter of every word to upper case. Display the new string.

Sample Input: we are in cyber world


Sample Output: We Are In Cyber World

29) Write a program to input a sentence and display the first and the
last characters of all the words whose length is more than 3
characters.

Sample Input: Protocol is a set of rules

Sample Output: Pl rs

30) Write a program to input a sentence and count the number of times
a particular word occurs in it.

Sample Input: Where there is a will, there is a way

Sample Output: Enter a word to be searched: there

2
31) Write a program to create an integer array of size 10. Print the
elements in forward and reverse order.

32) Write a program to create an integer array of size 10 and display


the even elements present in the array.

33) Write a program to create an array of size n. Fill marks obtained by


n students. Count and print how many of them scored marks>=80.

34) Write a program to store 6 elements in an array ‘p’ and 4 elements


in an array ‘q’ and produce a 3rd array containing all the elements
of ‘p’ and ‘q’.

35) The school office keeps the records of all the students of a class by
entering Admission Number and the name of the students. Write a
program to store all names along with their corresponding
admission numbers. Now, enter admission number of a student
and search whether the name is present or not. If the name is
present then display the name along with the admission number
otherwise display an appropriate message using Linear Search
technique.

36) Write a program to perform binary search on the given array.


int a[]={5, 15, 29, 36, 45, 53, 67, 84, 91, 100};

37) Write a program to input 10 numbers in an integer array and


arrange them in ascending order using Bubble Sort technique.
Display the sorted array.

38) Write a program to input 10 words in a single dimensional array .


Sort these words in alphabetical order (ascending) using Selection
sort technique and display the sorted array.

39) Write a program to store the numbers in a 4 by 4 matrix in Double


Dimensional Array. Find the highest and the lowest number of the
matrix by using assignment method.

40) Accept an array of 3 rows and 4 columns from the user:


(a) Print the sum of elements of each row of the array.
(b) Print the sum of elements of each column of this array.

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

You might also like