String Practice Questions and Answers

In this article, We will solve String related problems.


1. Write a program to take string input with space.

2. Write a program to find the length of the string using the inbuilt function.

3. Write a program to find the length of the string without using the inbuilt function.

4. Write a program to convert the Uppercase to lowercase using the inbuilt function.

5. Write a program to convert Lowercase to Uppercase using the inbuilt function.

6. Write a program to convert the Uppercase to lowercase without using the inbuilt function.

7. Write a program to convert the Lowercase to Uppercase without using the inbuilt function.

8. Write a program to convert alternative letters in uppercase 

9. Write a program to capitalize the first letter of every word in a string. 

10. Write a program to capitalize on the first and last letter of every word in a string. 

11. Write a program to check whether two strings are equal or not. 

12. Write a program to list vowels in a string

13. Write a program to count how many vowels present in a string.  

14. Write a program to reverse a string 

15. Write a program to list consonants in a string

16. Write a program to count how many consonants present in a string. 

17. Write a program to count the numbers of the word in a string

18. Write a program to count the number of white spaces in a sentence.

19. Write a program to check the given string is palindrome or not.

20. Write a program to count the number of vowels, consonants, numbers, and special characters present in a string.

21. Write a program to count repeated characters in a string.

22. Write a program to find the frequency of characters in a string.

23. Write a program to concatenate two strings.

24. Write a program to find the first capital letter in a given string.

25. Write a program to find the first small letter in a given string.

26. Write a program to sort names in alphabetical order.

27. Write a program to print the Ascii value of character in a String.

28. Write a program to check String Anagrams or Not.

29. Write a program to check whether string 1 match string 2.

30. Write a program to remove all uppercase characters in the string.

31. Write a program to remove all lowercase characters in the string.

32. Write a program to remove all special characters in the string.

33. Write a program to remove all numbers in the string.



















Post a Comment

0 Comments