Introduction to Programming Languages
Programming
languages are formal languages comprising a set of instructions that produce
various kinds of output. They are used in computer programming to implement
algorithms and control the behavior of machines.
Language Generation
Programming
languages have evolved through several generations:
- First
Generation (1GL):
Machine language, the most basic level of programming languages,
consisting of binary code.
- Second
Generation (2GL):
Assembly language, a low-level language with a strong correspondence to
the machine language instructions.
- Third
Generation (3GL):
High-level languages like C, C++, Java, Python, which are more abstract
and easier for humans to understand.
- Fourth
Generation (4GL):
Languages closer to human language, often used for database querying and
report generation (e.g., SQL).
- Fifth
Generation (5GL):
Languages used for artificial intelligence and neural networks (e.g.,
Prolog).
History of C++
C++
is a general-purpose programming language created by Bjarne Stroustrup as an extension of the C programming language,
incorporating object-oriented features. It was first released in 1985 and has
since undergone several updates to include modern programming practices and
paradigms.
Tools and Editors for C++ Programming
- IDEs
(Integrated Development Environments):
- Visual
Studio:
A comprehensive IDE from Microsoft.
- CLion: A
cross-platform IDE for C++ development from JetBrains.
- Code::Blocks: An
open-source, cross-platform IDE. And many more…
- Text
Editors:
- Visual
Studio Code:
A versatile and popular code editor.
- Sublime
Text:
A sophisticated text editor for code, markup, and prose.
- Notepad++: A free
source code editor and Notepad replacement. And many more…
Compilers
- GCC (GNU
Compiler Collection): A standard compiler for many Unix-like
systems.
- Clang: A
compiler front end for the C, C++, and Objective-C programming languages.
- Microsoft
C++ (MSVC):
The compiler provided with Microsoft Visual Studio.
Basics of Programming Fundamentals in C++
2. Comments
3. Data Types
4. Variables and Constants
5. Input and Output
6. Operators
7. Control Structures
- If-else statements:
- Switch statement:
- Loops:
- For loop:
- While loop:
- Do-while loop:
8. Functions
- Function declaration:
- Function definition:
9. Arrays
10. Pointers
11. Structure
12. Union
13. Enum
Flow of Code
- Preprocessing:
Preprocessor directives (e.g., #include, #define) are resolved.
- Compilation: Source
code is compiled into object code.
- Linking: Object
code is linked with libraries to create an executable.
- Execution: The
program is run, and the output is generated.
References
- Books:
- "The
C++ Programming Language" by Bjarne Stroustrup
- "Effective
C++" by Scott Meyers
- "C++
Primer" by Stanley B. Lippman, Josée Lajoie, and Barbara E. Moo
- “Let us C
and CPP” by Yashwant Kanitkar
- Personally, I suggest : “C in Depth” by Shrivastava
- Online
Resources:
- cplusplus.com
- GeeksforGeeks
C++ Programming Language
- Codecademy
C++ Course
- W3School
- Compiler
Documentation:
- GCC
Documentation
- Clang
Documentation
Comments
Post a Comment