Individual Assigment
Individual Assigment
A character in programming refers to a single symbol, letter, digit, or any other textual element that
is typically represented in a character encoding scheme such as ASCII or Unicode. As a data
structure, a character can be considered a primitive data type or part of a larger composite structure,
like strings or character arrays.
In terms of storage:
• A character is stored as a fixed-sized unit (e.g., 1 byte in ASCII, 2 bytes in UTF-16 for Java).
• It can hold individual characters such as 'A', '1', or symbols like '@'.
Characters in an array can serve as a basic building block for strings or perform specific operations
like searching, insertion, and deletion in text processing tasks.
Explanation of Operations
• Insertion:
Adds a new character at the specified index, shifting subsequent elements to the right.
Java code to show insertion of characters in array
• Deletion:
Removes a character from the array, creating a new array with one less element and skipping
the target index.
• Java code to show deletion of characters in array