STRINGS

148 programming challenges to help you master the fundamentals of C++ using OBJECT ORIENTED PROGRAMMING.

1

ENTER THE STRING FROM USER AND CONVERT IN UPPERCASE ?

2

ENTER THE STRING FROM USER AND CONVERT IN LOWERCASE ?

3

ENTER THE STRING FROM USER AND CONVERT INTO SENTENCE CASE ?

4

ENTER THE STRING FROM USER AND CONVERT INTO TITLE CASE ?

5

ENTER THE STRING FROM USER AND CONVERT INTO TOGGLE CASE ?

6

ENTER THE STRING FROM USER AND FINAL LENGTH OF THE STRING ?

7

ENTER TWO STRINGS FROM USER AND COMPARE THOSE STRINGS THAT THEY ARE EQUAL OR NOT?

8

ENTER TWO STRINGS FROM USER AND CONCATENATE THOSE STRINGS IN ANOTHER STRING AND DISPLAY THE ANSWER?

9

ENTER THE STRING FROM USER AND COPY IT INTO ANOTHER STRING VARIABLE?

10

ENTER THE STRING FROM USER, ENTER THE INDEX NUMBER AND PRINT CHARACTER PRESENT ON THAT INDEX ?

11

ENTER THE STRING FROM USER AND CHECK ITS PALINDROME OR NOT?

12

ENTER THE STRING FROM THE USER AND PRINT EACH CHARACTER IN NEW LINE ?

13

ENTER THE STRING FROM THE USER AND COPY REVERSE OF THE STRING INTO ANOTHER STRING ?

14

ENTER THE STRING FROM THE USER AND PRINT THE DIFFERENCE OF ASCII VALUE OF EACH CHARACTER ?

15

ENTER THE STRING FROM THE USER, ENTER A CHARACTER ALSO AND SEARCH THE CHARACTER IN THE STRING?

16

ENTER THE STRING FROM THE USER, ALSO ENTER A CHARACTER AND PRINT THE INDEX OF THE CHARACTER IF IT IS EXIST IN THE STRING ELSE PRINT -1.

17

ENTER THE STRING FROM THE USER, AND COUNT THE NUMBER OF VOWELS.

18

ENTER THE STRING FROM THE USER AND CONVERT INTO AN INTEGER VALUE?

19

ENTER THE STRING FROM THE USER AND CONVERT INTO A FLOAT VALUE?

20

ENTER THE STRING FROM THE USER AND COUNT THE NUMBER OF CHARACTERS, WORDS, SPACES AND LINES

21

PRINT ALL THE PERMUTATION OF A STRING I.E. "ABCDE".

22

ENTER THE STRING FROM THE USER, SORT THE STRING IN ASCENDING ORDER AND PRINT IT.

23

ENTER A SENTENCE FROM USER AND THEN ENTER THE WORD AND COUNT THE OCCURENCE OF THAT WORD IN THE SENTENCE.

24

ENTER A SENTENCE FROM USER AND THEN ENTER THE WORD AND REPLACE THAT WORD BY ANOTHER WORD.

25

ENTER THE STRING FROM THE USER AND TRIM/ ELIMINATE THE SPACES FROM BOTH ENDS (IF ANY).

26

ENTER THE STRING FROM USER AND SPLITS THE FIRST WORD AND SECOND WORD AND RETURN THE START INDEX OF THE SECOND WORD.

27

DISPLAY THE STRING ON THE OUTPUT SCREEN BUT ASK THE TEXT ALIGNMENT OPTION GIVEN BY THE USER (1 FOR LEFT, 2 FOR CENTER, 3 RIGHT)

28

CREATE A DICTIONARY HAVING 10 WORDS AND THEIR MEANING WITH FOLLOWING OPERATIONS. [CREATE, DELETE, SEARCH].

29

ENTER THE STRING FROM USER AND CONVERT CHARACTERS INTO THEIR ASCII VALUES IN THE INTEGER ARRAY. [FOR EXAMPLE TAKE 10 CHARACTERS]

30

Program to Check if a String contains only digits?

31

Program to perform Deep Copy for String?

32

Program to prove String is immutable programmatically?

33

Program to remove all occurrences of a given character from input String?

34

Program to append the string using StringBuffer class

35

Program to insert the string using StringBuffer class

36

Program to Add Characters to a String

37

Program to Add Characters to a String

38

Program to Check Anagram

39

Program to check whether a string is a Palindrome

40

Program to Convert Enum to String

41

Program to Convert String to String Array

42

Program to count number of words in a String?

43

Program to count the total number of characters in a string

44

Program to count the total number of punctuation characters exists in a String

45

Program to count the total number of vowels and consonants in a string

46

Program to determine whether a given string is palindrome

47

Program to determine whether one string is a rotation of another

48

Program to divide a string in 'N' equal parts.

49

Program to find all subsets of a string

50

Program to find all the permutations of a string

51

Program to find maximum and minimum occurring character in a string

52

Program to find Reverse of the string

53

Program to find the duplicate characters in a string

54

Program to find the duplicate words in a string

55

Program to find the frequency of characters

56

Program to find the largest and smallest word in a string

57

Program to find the longest repeating sequence in a string

58

Program to find the most repeated word in a text file

59

Program to find the number of the words in the given text file

60

Program to Get a Character From the Given String

61

Program to Insert a string into another string

62

Program to Iterate Over Characters in String

63

Program to Print a New Line in String

64

Program to Print even length words

65

Program to print smallest and biggest possible palindrome word in a given string

66

Program to remove all the white spaces from a string

67

Program to replace lower-case characters with upper-case and vice-versa

68

Program to replace the spaces of a string with a specific character

69

Program to separate the Individual Characters from a String

70

Program to Splitting into a number of sub-strings

71

Program to swap two string variables without using third or temp variable.

72

Program to Swapping Pair of Characters

73

Read two String user input and check if first contains second?

74

Reserve String without reverse() function

75

Reverse String Word by Word

76

Write a program to check if two Strings are created with same characters?

77

Write a program to find out first non repeated character from input String?

78

Create an object StringBuffer class to reverse the string.

79

Create an object StringBuffer class to show functionality of insert, append, delete and replace functions.

80

Program to Check Anagram

81

Program to Swapping Pair of Characters

82

Program to Check if a String contains only digits?

83

Program to perform Deep Copy for String?

84

Program to remove all occurrences of a given character from input String?

85

Program to Add Characters to a String

86

Program to check whether a string is a Palindrome

87

Program to Convert Enum to String

88

Program to count number of words in a String?

89

Program to count the total number of characters in a string

90

Program to count the total number of punctuation characters exists in a String

91

Program to count the total number of vowels and consonants in a string

92

Program to determine whether a given string is palindrome

93

Program to determine whether one string is a rotation of another

94

Program to divide a string in 'N' equal parts.

95

Program to find all subsets of a string

96

Program to find all the permutations of a string

97

Program to find maximum and minimum occurring character in a string

98

Program to find Reverse of the string

99

Program to find the duplicate characters in a string

100

Program to find the duplicate words in a string

101

Program to find the frequency of characters

102

Program to find the largest and smallest word in a string

103

Program to find the longest repeating sequence in a string

104

Program to find the most repeated word in a text file

105

Program to find the number of the words in the given text file

106

Program to Get a Character From the Given String

107

Program to Insert a string into another string

108

Program to Print a New Line in String (Each word in newline)

109

Program to Print even length words

110

Program to print smallest and biggest possible palindrome word in a given string

111

Program to remove all the white spaces from a string

112

Program to replace lower-case characters with upper-case and vice-versa

113

Program to replace the spaces of a string with a specific character

114

Program to separate the Individual Characters from a String

115

Program to Splitting into a number of sub-strings

116

Program to swap two string variables without using third or temp variable.

117

Read two String user input and check if first contains second?

118

Reverse String Word by Word

119

Write a program to check if two Strings are created with same characters?

120

Write a program to find out first non repeated character from input String?

121

Write a C++ method to count all words in a string

122

Write a C++ method to count all vowels in a string

123

Write a C++ Program to Sort Names in an Alphabetical Order

124

Write a C++ method to count all the words in a string.

125

Write a C++ method to compute the future investment value at a given interest rate for a specified number of years.

126

Write a C++ method to print characters between two characters (i.e. A to P).

127

Write a C++ method to check whether a string is a valid password.

128

Write a C++ method to display the current date and time.

129

Write a C++ method that accepts three integers and returns true if one is the middle point between the other two integers, otherwise false

130

Enter a string from user and convert in uppercase ?

131

Enter a string from user and convert into lowercase ?

132

Enter a string from user and convert into sentence case ?

133

Enter a string from user and convert into title case ?

134

Enter a string from user and convert into toggle case ?

135

Enter a string from user and final length of the string ?

136

Enter a string from user and compare those string ?

137

Enter a string from user and concatenate the string ?

138

Enter a string from user and copy that string into another string ?

139

Enter the string from user ,enter a number from user ,if the user enter 0 then you will print first character of string ,if the user enter 1 then you will print second character of string ,if user enter 2 then you will print third character of string ,if user enter 3 then you point fourth character of string and if out of string then you will print out of bound ?

140

Enter the string from user and print each character in new line ?

141

Enter the string from user and copy reverse order into another string ?

142

Enter two string from user and print difference each character ?

143

Enter the string from user and enter a character , it is exist or not ?

144

Enter the string from user and enter a character if it is exist then print the bound number ?

145

Enter the string from user and count all vowels ?

146

Enter the string from user and enter bound number and print character on that bound ?

147

String palindrome example (using reverse) ?

148

Enter the data from user the data consist of roll no. ,name ,class , marks of 5 subjects ?