<prompt> array_sum sumarrayRewrite code snippet yafuatayo katika C . Matumizi std maktaba.  <response>: Kwa kudhani kwamba safu ni ya aina std::array au std::vector, hapa ni code snippet rewritten: include include the std library for accumulation operations Kutoa std::array safu int array_sum std::accumulatearray.begin, array.end, 0; kutumia std::accumulate mahesabu ya jumla ya safu ; Kumbuka: std::accumulate inachukua iterators mbili na thamani ya awali kama hoja zake. Katika kesi hii, array.begin na array.end ni iterators ya safu, na 0 inawakilisha thamani ya awali. 