gpt4 book ai didi

c++ - 如果它的大小是固定的,如何插入到数组中?

转载 作者:行者123 更新时间:2023-11-30 01:39:07 25 4
gpt4 key购买 nike

<分区>

我需要写这样的程序:

The original elements of the array
20 34 45 2 10
Enter the index and number for insertion
3 12
Elements after insertion
20 34 45 12 2 10

我声明一个数组来存储初始数字:

int array[5] = { 20, 34, 45, 2, 10 };

但是我怎样才能插入到这个数组中呢?

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com