Exam 2 Review Quiz 09

Size size of the array int initarrayint arr int

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ] = 2.5; return x*2; } …what
does
the
following
code
print?
 int x = 5; float a[3] = {0.2, 0.4, 0.6}; int y = my_function(x, a); cout << x << endl; cout << y << endl; cout << a[1] << endl; cout << a[2] << endl; 
 
 
 Problem
2:
25
points.
 
 The
snippets
of
code
in
this
problem
do
not
successfully
accomplish
the
task
 described
in
their
accompanying
comment.

Correct
the
code
so
that
it
performs
the
 task
described
in
the
comment.
The
code
may
have
more
than
one
error.

Make
 your
corrections
clear
and
unambiguous.
 
 (a) 
 /* Function that finds and returns the smallest element of an integer array. Inputs are the array and...
View Full Document

Ask a homework question - tutors are online