[go: up one dir, main page]

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

Strings

The document lists 57 programming problems related to string manipulation and validation including printing characters, words, indexes, converting case, reversing strings, sorting, searching, counting characters and words, validating formats like Aadhar and PAN numbers.

Uploaded by

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

Strings

The document lists 57 programming problems related to string manipulation and validation including printing characters, words, indexes, converting case, reversing strings, sorting, searching, counting characters and words, validating formats like Aadhar and PAN numbers.

Uploaded by

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

1. Write a Program to print the alternative characters in a given String input?

2. Write a Program to print the alternative vowels in a given string?


3. Write a program to print the biggest / longest word in a given String?
4. Write a Program to print the ASCII key values of a given String characters?
5. Write a Program to print the index of a given character in a given string?
6. Write a Program to print the last index of a given character in a given string?
7. Write a Program to print the all the index’s of a given character in a given string?
8. Write a Program to print the given input in lowercase and uppercase?
9. Write a Program to print the string value from certain index to the end of the given String?
10. Write a Program to print the String value from certain index to certain index of a given
string?
11. Write a Program to store the given String in character array and then print that character
array?
12. Write a Program to check the given character/String in a another given String?
13. Write a Program to replace the all comma’s by space in a given string?
14. Write a Program to replace the one word by another word in a given string?
15. Write a Program to split the given String into individual words?
16. Write a Program to understand the use of the trim method in strings?
17. Write a Program to understand that where we have to use == and equals Method in strings?
18. Write a Program to understand equalsIgnoreCase method in strings?
19. Write a Program to check which is first word in dictionary order of given two words?
20. Write a Program to check which is first word in dictionary order of given two words by
ignoring Case?

Validations:-
21. Write a Program to check/validate given String value is Valid Aadhar Number or not?
Input1: 439876875869
Ouput1:Valid Aadhar Number
Input2: 43@776875869
Ouput2:Not a Valid Aadhar Number
Input3: jtniv9t349nc
Ouput3:Not a Valid Aadhar Number
Input4: 1234 5678 9101
Ouput4:Valid Aadhar Number
Input5: 1234567890123412
Ouput5:Not a Valid Aadhar Number

22. Write a Program to check/validate given String value is Valid Pan Number or Not?
23. Write a Program to check/validate given String value is Valid registration number or not of a
Vehicle?
24. Write a Program to check/validate given Password is perfect or not and the conditions are
Password length must be 9 characters and must at least one capital, one small, one
number and one special character (except space) ?

Searching:-
25. Write a program to find the given word or a character is present or not in a given String?
26. Write a program to find the index values of a given word in a given String?
27. Write a program to find the numbers in a given String and print there index values?

Separation of categories:-
28. Write a program to count the number of Special keys in a given String?
29. Write a program to count the small letters in a given String?
30. Write a program to print the all small characters, then print the capitals character, then print
the Special characters and print the numbers in a given String?

Conversions(small<->Capitals):-
31. Write a program to convert all small characters into capital characters and all capitals
characters into small characters remaining characters don’t disturb any thing print Directly?
32. Write a program to convert all small characters into capital characters and all capitals
characters into small characters of alternative places?

Reverse of a String:-
33. Write a program to print the reverse of a given word ?
34. Write a program to print the all given words in reverse without changing words positions?
Input: to print the all given words
Output:ot tnirp eht lla nevig sdrow
35. Write a program to print the given String in reverse?
36. Write a program to find the given String is Palindrome or not?
Frequency / occurrence / Duplicates:-
37. Write a program to find the count of a each and every word in a given String?
38. Write a program to find the count of a each and every character in a given String?
39. Write a program to print most repeated character and word in a given String?
40. Write a program to print the words in given string to the count(Repetation) in decreasing
order?
41. Write a program to print the unique words in a given string?
42. Write a program to print the smallest Unique word in a given String?
43. Write a program to print the largest Unique word in a given String
44. Write a program to print the words and count of the duplicate words in a given String?

subStrings:-
45. Write a program to print the all substrings in a given string?
Input: java
Output: j, ja, jav, java, a, av, ava, v, va, a
46. Write a program to find the given substring is there are not in a given String?

Sortings:-
47. Write a program to print the all words in decreasing order(word size) of a Given String?
48. Write a program to sort the words in a given String according to alphabetically
(lexigrophically)?
49. Write a program to print the “N” number of time repeated word in a given string?
50. Write a program to print all characters in alphabetical order in a given string with repetition?

Use Cases:-
51. Write a Program to print the common words in a given two Strings?
52. Write a Program to print the common Unique words in a given two Strings?
53. Write a Program to print all the words in a given two Strings by one time only?
54. Write a Program to print all the words in a given two Strings in sorted order?
55. Write a Program to print to the given String as three characters in each line?
56. Write a Program to print to the given String characters as shown in example?
Ex:- Input:- I am preparing myself for MNC’s and Product based companies.
Output:- I
am
pre
pari
ngmys
elffor
MNC’san
dProduct
basedcomp
anies.
57.

You might also like