1st question answer
![chang of Nalu of Voiables Line (Means Line Trainy 10 nt TEN= TEN, aTEN n num c Const n354,num,c=0 araTENJ aiEN] That is all h](http://img.homeworklib.com/questions/a5e0cab0-32c7-11eb-8123-09b56076a401.png?x-oss-process=image/resize,w_560)

in simple steps

![TEN ahEN C n num k O-I0 false leminakd loop for loop shted I6 from step aften now a] d is prihed Cout endend w new Gn qkJ- af](http://img.homeworklib.com/questions/a92da370-32c7-11eb-9424-01258e46fd19.png?x-oss-process=image/resize,w_560)
program and output
![.Cpp #include <iostream> 2 using namespace std; 3 int main() 4 1 const int TEN 10; int a[TEN],n-354, num, c-0; 5 6 7 num-n; 8](http://img.homeworklib.com/questions/aa32dfa0-32c7-11eb-87dc-d9c3837a3c77.png?x-oss-process=image/resize,w_560)
2nd question answer
![int A=6,sT, ss, 88, 73,063 for loop beg & k num AF /Fntsf 4,r,73, ,0,0p.0 ACGI AC] £6 66 55 Ab hum &07- f0,0,0,0,0,0,0 A (03-](http://img.homeworklib.com/questions/abae4c30-32c7-11eb-b014-7dc5d31b8aad.png?x-oss-process=image/resize,w_560)
![Afu snum 88>55 B(ki+]A 2J=8k2l=3 A 0 jtl ST 3 6131,463 0,01 -Toa oTOn Afr]snum 0-UA B(ktt) ACi k 3tl BC3] 77 j-5H6 AGJ-0 fo,T](http://img.homeworklib.com/questions/ac868a90-32c7-11eb-ba7f-5d6b1a8e82f6.png?x-oss-process=image/resize,w_560)
in the context of detailed explanation given more data..
if you have any problem in the means of understanding please comment..
all the best... hope u enjoy... thank u
Part #2 Trace and show your steps and the output of the following code segment const...
Consider the following code segment, what is the output? //you please explain your answer with all the steps?? int j, k; for (k=0;k<10; k++) { for (j=0; j<5;j++) cout << "*"; } cout << endl;
howthe output of the following 4 program segments (a) const int SIZE=8; int values[SIZE] = {10, 10, 14, 16, 6, 25, 5, 8}; int index; index=0; res = values[index]; for (int j=1; j<SIZE; j++) { if (values[j] > res) { res = values[j]; index = j; cout << index << res << endl; } } cout <<...
Example (4) Trace the following program and find the output >> SOURCE CODE #include <iostream.h> int main0 // define two integers int x-3; int y = 4; //print out a message telling which is bigger if (x >y) i cout << "x is bigger than y" << endl: else cout << "x is smaller than y" << endl; return 0; Example (5) Write a C++ program that takes from the user a number in SR (Saudi Riyal) then the program...
points): Show the output of the code below as it would appear on the monitor. int main cout <<" <<endl: int wildcat 2: while (wildcat > 5) cout << wildcat <<endl; wildcat++ cout <K*<< endl; int jayhavk 5i do cout << jayhawk <s endl: while (jayhawk0) cout <<*" << endl; int wolverine l: while (wolverine 0 &&wolverine < 10) cout << wolverine <<endl: wolverine2: cout <<" <<endl: for (int zag-4; zag>0; zag_) cout <<****" << endl; for (int i-10; i<-30;...
a) Hand-trace the following program and determine and write down what is the output of the code. b) Run the code and compare the program output to your hand-traced result obtained from part (a). #include <iostream> #include <iomanip> using namespace std; void f(); int x = 5; int main() { cout << "x = " << x << endl; int x = 6; cout << "x = " << x << endl; { int...
18 C++
1. What is the output of the following program segment? int y-22: while ((y 3) != 0) cout << y<< "": y=y-2; The output is 2. Suppose that the input is 100, 20,-8, 50, 20. What is the output of the following C++ code? int sum0 int num: int j cin >> num: if (num < 0) continue зит зит + num; cout<< sum << endl; The output is
IV. Function Tracing (20 points) Trace the following program. Show llof your work and the ound he output in the work including labeled boxes for user-defined functions, calculations, and the output in designated spaces. You should draw a box for each variable and show value updates d the output, Show all of your #include <iostream» using namespace std; void mickey (int sa, int b, int &c) void minnie(int u, int &v, int w); void pluto (int m, int n, int...
Trace the following program and display the exact outpust #incl udeci ostream» using namespace std const int siz-10 int ffx(Float ati,Float b(l, int s): bool ifp(int n) int mainO loat arysiz]-(6,19,5,3,2,17,40,90,19,80) float ary2tsiz)-to int i,x x-ffx(aryl,ary2, ,siz): cout<<"n The values are: for(1-0:1<" ; it) ary2[i] ; cout<<" coutくくendl ; return 0; oerio int ffx(float all,float bll, int S) int i,p-0; for(i 0: i<s ; i++){ )// end for LD++]=a[i]; return p; if(ifp(ali])) bool ifp(int n)l bool ans-true for (i=2:ic, itt)...
what is the output for the following code? explain the steps. /*#include <iostream> using namespace std; int f(int &i) { i = 10; return(5 * i); } int main() { int n = 5; f(n); cout << n << "\n"; return 0; } #include <iostream> using namespace std; int sub1(int n) { n--; return n; } int main() { int m = 10; for(int j = 0; j < 10; j++) m -= sub1(j); cout << m << "\n"; return...
What is the output from each of the following segments of C++ code? Record the output after the “Answer” prompt at the end of each program fragment. Assume all variables have been suitably declared. (Each problem is worth 3 points.) 1. for (int j = 25; j > 16; j -= 3) cout << setw(5) << j; Answer: 2. int sum = 0; for (int k = -2; k <= 2; k++) sum = sum +...