mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2026-09-24 15:00:31 +08:00
Add content: Array initialization examples in C++ roadmap
Added examples for partial and zero array initialization. Fixed typo. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -60,6 +60,8 @@ Arrays are used to store multiple values of the same data type in consecutive me
|
||||
Example:
|
||||
```cpp
|
||||
int numbers[5] = {1, 2, 3, 4, 5};
|
||||
int scores[10] = {100,95,98}; // Partially initialized array. 100,95,98 initialized on first 3 indexes, rest indexes are initialized with 0
|
||||
int allZero[0] = {0}; // initialized all to zero
|
||||
```
|
||||
|
||||
## Pointers
|
||||
|
||||
Reference in New Issue
Block a user