String Slicing and Data Abstraction
How does the concept of ‘slicing’ in string manipulation relate to the broader principle of data abstraction in computer science?
A
Slicing is a low-level operation that contradicts data abstraction principles by exposing the internal representation of strings.
B
Slicing allows programmers to work with subsets of data without modifying the original string, exemplifying data abstraction by providing a higher-level operation on complex data structures.
C
String slicing is unrelated to data abstraction and is solely used for efficiency in memory management.
D
Slicing demonstrates data abstraction by permanently altering the original string to create new, smaller string objects.
Question Leaderboard
Not enough data yet to show leaderboard.
APFIVE