0% found this document useful (0 votes)
4 views3 pages

C++ Introduction and Key Concepts Guide

C++ was created by Bjarne Stroustrup in 1979, evolving from 'C with Classes' to its current form, supporting both procedural and object-oriented programming. It offers advantages like high performance, code reusability, and dynamic memory management, making it suitable for various applications including gaming and robotics. Key features include a rich character set, various types of tokens, operators, and a defined operator precedence and associativity.

Uploaded by

aaglemayur82
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views3 pages

C++ Introduction and Key Concepts Guide

C++ was created by Bjarne Stroustrup in 1979, evolving from 'C with Classes' to its current form, supporting both procedural and object-oriented programming. It offers advantages like high performance, code reusability, and dynamic memory management, making it suitable for various applications including gaming and robotics. Key features include a rich character set, various types of tokens, operators, and a defined operator precedence and associativity.

Uploaded by

aaglemayur82
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Unit 1 – Introduction to C++ (Detailed Exam Notes)

1. History of C++

C++ was developed by Bjarne Stroustrup in 1979 at AT&T; Bell Labs (USA).

Started as “C with Classes” and became C++ in 1983.

“++” means increment over C.

Standard versions: C++98, C++03, C++11, C++14, C++17, C++20.

Supports both procedural and object-oriented programming.

2. Advantages of C++

- Supports OOP concepts: class, object, inheritance, encapsulation.

- High performance and fast execution.

- Reusable code via inheritance and templates.

- Portable across platforms.

- Standard Template Library (STL).

- Supports dynamic memory (new/delete).

- Used in gaming, OS, compilers, robotics.

3. Difference Between C++ and Old Programming Languages

Programming Approach:

Old: Procedure-oriented.

C++: Object-oriented + procedural.

Data Security:

Old: Less secure, global data.

C++: Encapsulation and access specifiers.

Code Reusability:

Old: Limited.

C++: High—inheritance, templates.


Memory Management:

Old: Static memory.

C++: Dynamic (new/delete).

Flexibility:

Old: No OOP support.

C++: Multi-paradigm.

4. Character Set

Letters A–Z, a–z

Digits 0–9

White spaces: space, tab, newline

Symbols: + - * / % & @ $ _ # {} [] () ; :

Escape sequences: \n, \t, \b

5. Tokens, Identifiers, Keywords, Variables

Tokens: smallest unit.

Identifiers: user-defined names.

Keywords: int, float, if, else, class.

Variables: memory locations to store data.

6. Operators

Arithmetic: + - * / %

Relational: == != < > <= >=

Logical: && || !

Assignment: = += -=

Increment/Decrement: ++ --

Bitwise: & | ^ << >>

Conditional: ? :

Sizeof: sizeof()
7. Operator Precedence & Associativity

High → Low: () → ++ -- → * / % → + - → relational → == != → && → || → assignment

Associativity:

Left to Right: * / %, + -, < >, &&, ||

Right to Left: =, +=, !, ++ --

You might also like