String - 32
Problem Set 8.2: String
String Basic
Declare a String Variable (Repeated: Problem Set 1.1: Data Type, IO)
Assign value to a String Variable (Repeated: Problem Set 1.1: Data Type, IO)
Initialize a String Variable in all possible ways (Repeated: Problem Set 1.1: Data Type, IO)
Print the value of a String Variable (Repeated: Problem Set 1.1: Data Type, IO)
[1] Print the Amount of Memory Allocated (Memory Size) by a String variable
[2] Print the Memory Address for a String Variable
Input String
Input the first character of your name and display it on the screen (Repeated: Problem Set 1.1: Data Type, IO)
Input one word (string) (Ex: your last name) and print that word (Repeated: Problem Set 1.1: Data Type, IO)
Input one sentence (Ex: your full name) and print that sentence (Repeated: Problem Set 1.1: Data Type, IO)
Input a sample paragraph with 3-5 sentences and print all the sentences (Similar: Problem Set 8.2: String)
[3] Input string and print that string for N times (Take Input N from the user at the beginning)
[4] Input string and print that string until the input is "quit"
[5] Input string and print that string until the end of file
Character Count in String
[6] Count the length (total number of characters) of a String
[7] Count the total number of Uppercase Letters in a String
[8] Count the total number of Lowercase Letters in a String
[9] Count the total number of Alphabet in a String
[10] Count the total number of Digits in a String
[11] Count the total number of Alphanumeric Characters in a String
[12] Count the total number of Special Characters in a String
[13] Count the total number of Vowels in a String
[14] Count the total number of Consonants in a String
Other Counts in the String
[15] Count the total number of words in a String
[16] Count the total number of sentences in a paragraph
[17] Count the total number of Articles in a Paragraph
Character Conversion in String
[18] Print a String in Uppercase Letters (Original String may contain uppercase, lowercase, digit, and special character)
[19] Print a String in Lowercase Letters (Original String may contain uppercase, lowercase, digit, and special character)
[20] Print a String, print all the Vowels in Uppercase Letters, and print all the Consonant in Lowercase Letters (Original String may contain uppercase, lowercase, digit, and special character)
Arithmetic Operations [Big Integer Operation] (Input Two Integer Numbers into String) [In Decimal, In Binary]
[21] Perform Addition Operation
[22] Perform Subtraction Operation
[23] Perform Multiplication Operation
[24] Perform Division Operation
[25] Perform Reminder Operation
String Operations
[26] Compare two strings to find whether they are the same or not
[27] Print a String in Reverse Order
[28] Reverse the String into another variable
[29] Reverse the String into the same variable
[30] Check whether a string is a Palindrome or not
[31] Compare two strings [strcmp(str1, str2), library: string.h]
Lexicographically same (same string)
Lexicographically smaller (Comes first in Dictionary Order)
Lexicographically bigger (Comes later in Dictionary Order)
[32] Input Multiple String and print them in Dictionary Order (Lexicographical Order)
Note: Solve all the problems without using the Library Function, then solve using the necessary Library Function where applicable.
Last updated