General Points regarding C programming language
- The three important aspects of any language are:
- The way in which it stores the data
- The operators it uses to transform and combine data
- How it accomplishes I/P & O/P
- C was developed at AT & T's Bell Labs, USA in 1972 by Dennis Ritchie.
- The major advantages that promoted its use were its reliability, ease of use and simplicity.
- Languages can be classified as:
- High Level/Problem Oriented Languages: Ensure faster development or better programming efficiency. Examples: FORTRAN, PASCAL, Java, etc.
- Low Level/Machine Oriented Languages: Ensure faster execution or better program execution. Example: Assembly language
- C fits in between the two categories, hence, it is often termed as Middle level language. C not only allows bit-oriented operations, Direct Memory Access and usage of pointers but also provides high level constructs. Hence, both code readability and performance are ensured.
- Exponentiation operations allowed in higher level languages (2**3, 2^3) aren't considered valid in C.
- Types of Instructions are:
- Sequence Control,
- Decision Control,
- Loop Control &
- Case Control Instruction
- The usage of nested if-else's (Decision control) can be minimised by using logical operators (&&, ||). Nested if-else increases the complexity and lines of code.
- Conditional operators - Expression1 ? Expression2 : Expression3. As only one statement is allowed after ? or :, hence, usage in serious programming is limited.
- Other points will be added soon...
No comments:
Post a Comment