C++ programming Exercises practice with solution
What is C++ Programming Language?
C++ is a general-purpose programming language. It has imperative, object-oriented and generic programming features, while also providing facilities for low-level memory manipulation.
It was designed with a bias toward system programming and embedded, resource-constrained and large systems, with performance, efficiency and flexibility of use as its design highlights. Many vendors provide C++ compilers, including the Free Software Foundation, Microsoft, Intel, and IBM.
The best way we learn anything is by practice and exercise questions. We have started this section for those (beginner to intermediate) who are familiar with C++ programming.
Hope, these exercises help you to improve your C++ programming coding skills. Currently, following sections are available, we are working hard to add more exercises .... Happy Coding!
List of C++ Exercises
- Basic Exercises: 85 Exercises with Solution
- Basic Algorithm Exercises: 117 Exercises with Solution
- For Loop Exercises: 87 Exercises with Solution
- Date Exercises: 6 Exercises with Solution
- String Exercises: 21 Exercises with Solution
- Array Exercises: 29 Exercises with Solution
- Math Exercises: 31 Exercises with Solution
- Numbers: 46 Exercises with Solution
- Sorting and Searching: 14 Exercises with Solution
- More ....
More to Come !
Popularity of Programming Language Worldwide, Apr 2022 compared to a year ago:
Rank | Change | Language | Share | Trend |
---|---|---|---|---|
1 | Python | 27.95 % | -2.2 % | |
2 | Java | 18.09 % | +0.6 % | |
3 | Javascript | 9.14 % | +0.5 % | |
4 | C# | 7.39 % | +0.5% | |
5 | C/C++ | 7.06 % | +0.4 % | |
6 | PHP | 5.48 % | -0.9 % | |
7 | R | 4.41 % | +0.5 % | |
8 | ![]() |
TypeScript | 2.27 % | +0.5 % |
9 | ![]() |
Objective-C | 2.23 % | -0.3 % |
10 | ![]() |
Swift | 2.06 % | +0.2 % |
11 | ![]() |
Matlab | `1.84% | +0.1 % |
12 | ![]() |
Kotlin | 1.59 % | -0.2 % |
13 | Go | 1.27 % | -0.1 % | |
14 | ![]() |
Rust | 1.25 % | +0.3 % |
15 | Ruby | 1.09 % | -0.1% | |
16 | ![]() |
VBA | 1.07 % | -0.2 % |
17 | ![]() |
Ada | 0.8 % | +0.1 % |
18 | ![]() |
Scala | 0.69 % | +0.1 % |
19 | ![]() |
Dart | 0.69 % | +0.1 % |
20 | ![]() |
Abap | 0.67 % | +0.1 % |
21 | ![]() |
Visual Basic | 0.62 % | -0.1% |
22 | ![]() |
Lua | 0.5 % | -0.1 % |
23 | ![]() |
Groovy | 0.44 % | +0.1 % |
24 | ![]() |
Perl | 0.43 % | -0.0 % |
25 | ![]() |
Julia | 0.39 % | +0.0 % |
26 | ![]() |
Haskell | 0.29 % | +0.1 % |
27 | ![]() |
Cobol | 0.29 % | -0.0 % |
Source : https://pypl.github.io/PYPL.html
TIOBE Index for April 2022
Apr 2022 | Apr 2021 | Change | Programming Language | Ratings | Change |
---|---|---|---|---|---|
1 | 3 | ![]() |
Python | 13.92% | +2.88% |
2 | 1 | ![]() |
C | 12.71% | -1.61% |
3 | 2 | ![]() |
Java | 10.82% | -0.41% |
4 | 4 | C++ | 8.28% | +1.14% | |
5 | 5 | C# | 6.82% | +1.14% | |
6 | 6 | Visual Basic | 5.40% | +0.85% | |
7 | 7 | JavaScript | 2.41% | -0.03% | |
8 | 8 | Assembly language | 2.35% | +0.03% | |
9 | 10 | ![]() |
SQL | 2.28% | +0.45% |
10 | 9 | ![]() |
PHP | 1.64% | -0.19% |
11 | 16 | ![]() |
R | 1.55% | +0.44% |
12 | 12 | Delphi/Object Pascal | 1.18% | -0.29% | |
13 | 14 | ![]() |
Go | 1.09% | -0.14% |
14 | 15 | ![]() |
Swift | 1.00% | -0.19% |
15 | 13 | ![]() |
Ruby | 0.88% | -0.35% |
16 | 11 | ![]() |
Classic Visual Basic | 0.83% | -0.71% |
17 | 23 | ![]() |
Objective-C | 0.82% | +0.15% |
18 | 18 | Perl | 0.79% | -0.21% | |
19 | 37 | ![]() |
Lua | 0.78% | +0.45% |
20 | 19 | ![]() |
MATLAB | 0.74% | -0.25% |
Source : https://www.tiobe.com/tiobe-index/
C++ Programming: Tips of the Day
Compiling with g++ using multiple cores
You can do this with make - with gnu make it is the -j flag .
For example if you want 4 parallel jobs from make:
make -j 4
You can also run gcc in a pipe with
gcc -pipe
This will pipeline the compile stages, which will also help keep the cores busy.
If you have additional machines available too, you might check out distcc, which will farm compiles out to those as well.
Ref : https://bit.ly/3rOiJ5A
- New Content published on w3resource:
- HTML-CSS Practical: Exercises, Practice, Solution
- Java Regular Expression: Exercises, Practice, Solution
- Scala Programming Exercises, Practice, Solution
- Python Itertools exercises
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework
- Angular - JavaScript Framework
- Vue - JavaScript Framework
- Jest - JavaScript Testing Framework