Character - 29

Problem Set 8.1: Character

  1. Character Basic

    1. Declare a Character Data Type Variable (Repeated: Problem Set 1.1: Data Type, IO)

    2. Assign a Character Constant in a Character Variable (Repeated: Problem Set 1.1: Data Type, IO)

    3. Initialize a Character Variable using a Character Constant (Repeated: Problem Set 1.1: Data Type, IO)

    4. Print the Character Variable (Repeated: Problem Set 1.1: Data Type, IO)

    5. Print the Amount of Memory Allocated (Memory Size) by a character variable. (Repeated: Problem Set 1.3: Data Type, IO)

    6. Print the Memory Address for a Character Variable (Repeated: Problem Set 1.3: Data Type, IO)

  2. Character Input

    1. Take a Character input from the user and print the Character (Repeated: Problem Set 1.1: Data Type, IO)

    2. Take two Characters input separated by space/newline from the user and print both Characters (Repeated: Problem Set 1.2: Data Type, IO)

    3. [2] Take Character input and print the character for N times (Take Input N from the user at the beginning)

    4. [3] Take Character input and print the character until the input character is '0'

    5. [4] Take Character input and print the character until the end of file

  3. ASCII Code

    1. [5] Print the Character Variable as a Character and ASCII Code Value

    2. [6] Print all the Digits (0-9) with their ASCII Code Values separated by a space, and each digit in a separate line

    3. [7] Print all the Uppercase Letters (A-Z) with their ASCII Code Values separated by a space, and each letter in a separate line

    4. [8] Print all the Lowercase Letters (a-z) with their ASCII Code Values separated by a space, and each letter in a separate line

    5. [9] Print all the ASCII Characters with their ASCII Code (0-255) Values

    6. [10] Input a Character and Print its ASCII Code

  4. Character Test (Create User-Defined Function)

    1. [11] is_upper - Check whether a Character is a Uppercase Letter or not

    2. [12] is_lower - Check whether a Character is a Lowercase Letter or not

    3. [13] is_alpha - Check whether a Character is an Alphabet or not

    4. [14] is_digit - Check whether a Character is a Digit or not

    5. [15] is_alphanum - Check whether a Character is an Alphanumeric Character or not

    6. [16] is_vowel - Check whether a Character is a Vowel or not

      1. [16.1] Use if-else

      2. [16.2] Use switch case

    7. [17] is_consonant - Check whether a Character is a Consonant or not

    8. [18] is_xdigit Check if the character is a hexadecimal digit (function)

    9. [19] is_punct Check if the character is a punctuation character (function)

    10. [20] is_print Check if the character is printable (function)

    11. [21] is_graph Check if the character has a graphical representation (function)

    12. [22] is_cntrl Check if the character is a control character (function)

    13. [23] is_space Check if the character is a white space (function)

    14. [24] is_blank Check if the character is blank (function)

    15. [25] is_equal - Test equality of two Characters

  5. Character Conversion (Create User-Defined Function)

    1. [26] to_lower - Convert an Uppercase Letter to a Lowercase Letter

    2. [27] to_upper - Convert a Lowercase Letter to a Uppercase Letter

    3. [28] reverse_case - Reverse Case (If the character is in uppercase convert it to lowercase and vice versa)

  6. [29] Perform basic arithmetic operations. At first, take two integers and then a symbol of the arithmetic operation as input. (Create User-Defined Function)

    • Addition (+)

    • Subtraction (-)

    • Multiplication (*)

    • Division (/)

    • Reminder (%)

    • Power (^)

Last updated