Question
8.1 Lab 08 - Requirements Study the code below. Try to predict what the output will be before you run it. Part I - Using
8.1 Lab 08 - Requirements
Study the code below. Try to predict what the output will be before you run it.
Part I - Using Functions (15 pts)
See canvas for directions of getting into the csegrid
Complete zylabs 8.2 - 8.4. You will use a single main.cpp for these labs. You will create these files in csegrid, run them, then upload them to zybooks. Don't forget to submit for grading. You should make a new directory on csegrid for each of the these assignments. Work on them until they pass all tests (or as many as possible). When you are ready, don't forget to submit each one, otherwise you will not get credit.
** Part III csegrid screen shots (10 pts) **
Submit the screen shots for each of three function outputs from csegrid to canvas.
#include
void printArray(int a[], int size) { //remember arrays and vectors start at position zero for (int i=0; i //arrays are passed by reference, so changes in the function effect the calling function void changeArray (int a[], int size, int pos, int value) { a[pos] = value; } void printVector (vector //vectors are passed by value (by default), so changes in the function do not effect the calling function void changeVectorValue (vector //vectors are passed by value (by default), but if passed by value changes in the function will effect the calling function void changeVectorReference (vector //the ASCII table shows 97 is 'a' for (int i = 97; i < 123; i++) charVector.push_back(i); cout << " vector after push_backs"<
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started