
Programming fundamentals are used to guide the process of the software development life cycle. Most of the programming basics and fundamentals are used worldwide and are accepted as a token of standardisation which is followed by top programming languages.

Differences exist in the different programming languages but most of them are that programming fundamentals are almost similar in every language. In this article, let us become familiar with some of the programming fundamentals and learn how to excel in programming.
Also Read: Basic PHP Syntax: Features, History, Variables And Embedding
🧐 Click here to know 🗞️
Getting familiar with programming fundamentals is very important to excel in coding skills and web development. Let us know some of the major programming fundamentals. We will be using C++ for examples ahead in this article.
| #include <iostream> //standard library #include <vector> #include <strings> #include <algorithm> #include <map> #include <fstream> #include <cmath> #include <cstdlib> |
| Data Type | Size (bytes) | Range |
| int | 4 | -2,147,483,648 to 2,147,483,647 |
| unsigned int | 4 | 0 to 4,294,967,295 |
| short | 2 | -32,768 to 32,767 |
| unsigned short | 2 | 0 to 65,535 |
| long | 4 (or 8) | -2,147,483,648 to 2,147,483,647 (or larger) |
| long long | 8 | -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 |
| float | 4 | ±3.4E-38 to ±3.4E+38 |
| double | 8 | ±1.7E-308 to ±1.7E+308 |
| long double | 10, 12, or 16 | More precision than double |
| char | 1 | -128 to 127 (signed) or 0 to 255 (unsigned) |
| bool | 1 | true or false |
| wchar_t | 2 or 4 | Implementation-defined range |
| void | 0 | N/A |
| nullptr_t | Implementation-defined | N/A |
| #include <iostream> using namespace std; // avoid using 'std::' before standard library names int main() { cout << "Hello, World!" << endl; // Output the message to the console return 0; // Indicate successful program termination } |
| Category | Data Type | Size (bytes) | Range |
| Basic Types | int | 4 | -2,147,483,648 to 2,147,483,647 |
| unsigned int | 4 | 0 to 4,294,967,295 | |
| short | 2 | -32,768 to 32,767 | |
| unsigned short | 2 | 0 to 65,535 | |
| long | 4 or 8 | Platform-dependent | |
| unsigned long | 4 or 8 | Platform-dependent | |
| long long | 8 | -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 | |
| unsigned long long | 8 | 0 to 18,446,744,073,709,551,615 | |
| float | 4 | ±3.4E-38 to ±3.4E+38 | |
| double | 8 | ±1.7E-308 to ±1.7E+308 | |
| long double | 10, 12, or 16 | Platform-dependent | |
| char | 1 | -128 to 127 (signed) or 0 to 255 (unsigned) | |
| bool | 1 | true or false | |
| wchar_t | 2 or 4 | Implementation-dependent | |
| void | 0 | N/A |
| Category | Data Type |
| Pointer | type* |
| Reference | type& |
| Array | type arrayName[size] |
| Function | returnType func() |
| Category | Data Type |
| Enumeration | enum |
| Structure | struct |
| Class | class |
| Typedef/Using | typedef, using |
| Union | union |
| Data Structure | Import Header | Features |
| Array | No special header required |
|
| Vector | <vector> |
|
| Deque | <deque> |
|
| List | <list> |
|
| Stack | <stack> |
|
| Queue | <queue> |
|
| Priority Queue | <queue> |
|
| Set | <set> |
|
| Unordered Set | <unordered_set> |
|
| Map | <map> |
|
| Unordered Map | <unordered_map> |
|
| Multiset | <set> |
|
| Multimap | <map> |
|
| Bitset | <bitset> |
|
| Forward List | <forward_list> |
|
| Heap | <queue> (for priority queue) |
|
| String | <string> |
|