The concept at abstraction is commonly found in computer science. A big program is never written as a monolithic piece of program, instead it is broken down in smaller modules called as functions and each module is developed independently.
When the program is hierarchical organized, then the main program utilizes services of the functions. The main program uses the services of the functions without knowing their implementation details. Thus a level of abstraction is created.
When an abstraction is created, our concern is limited to “what it can do” and not “how it is done”
Abstraction for primitive types (char, int, float) is provided by the compiler. For example, we use integer type data and also, perform various operations on them without knowing:
- How various operations are performed on them.
Constant -13 is converted to 2´s complement and then stored in x. Representation is handled by the compiler.
Basically abstraction is hiding the complexity of implementation form the user. The implementation is handled by the compiler itself.