Question: What is wrong with the following program? #include int sum _ ints ( ) { int * some _ ints = new int [ 5
What is wrong with the following program?
#include
int sumints
int someints new int;
for int i ; i ; i
someintsi i;
for i
int sum ;
for int i ; i ; i
sum someintsi;
for i
return sum;
sumints
int main
std::cout sumints;
main
Group of answer choices
sumintsindexes out of bounds into someints
sumints leaks the memory pointed to by someints
someints points to uninitialized memory
main must have a return statement
nothing is wrong with this program
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
