Commit 22961f3
committed
feat: Copy elements from one array to another using loop
🧠 Logic:
- Initializes an array `A` with 10 integers.
- Creates a new array `B` of the same size.
- Copies each element from `A` to `B` using a for loop.
- Prints the contents of array `B` using an enhanced for-loop.
Signed-off-by: Somesh diwan <[email protected]>1 parent 720bed6 commit 22961f3
1 file changed
+6
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
| 3 | + | |
| 4 | + | |
7 | 5 | | |
8 | 6 | | |
9 | 7 | | |
10 | 8 | | |
11 | | - | |
12 | | - | |
| 9 | + | |
13 | 10 | | |
14 | 11 | | |
15 | 12 | | |
16 | | - | |
17 | | - | |
| 13 | + | |
18 | 14 | | |
19 | 15 | | |
20 | 16 | | |
21 | | - | |
| 17 | + | |
0 commit comments