Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Set a breakpoint on line 21. Run the program. Advance through the program using the next command and enter a seed value of 2142021. After

Set a breakpoint on line 21. Run the program. Advance through the program using the next command and enter a seed value of 2142021. After calling the shuffle() function, what is the value of array[8]? 1 points QUESTION 2 Restart the program and run it with a seed value of 2152021. After calling the fill() function but before calling the shuffle() function, what is the value of array[13]? 1 points QUESTION 3 Restart the program and run it with a seed value of 2162021. Step into the fill() function. Inside the loop, when i == 14, what is the value of index after assignment? (i.e., on Line 40 after executing the statement index = rand() % size;) 1 points QUESTION 4 Restart the program and run it with a seed value of 2172021. Step into the fill() function. Set a watchpoint on array[29] (you can use the gdb command watch to do this). Continue the execution of the program. When it stops, what is the new value of array[29]? 1 points QUESTION 5 Continue the execution of the program. When it stops for the second time, what is the new value of array[29]? After answering, delete the watchpoint using the delete command. 1 points QUESTION 6 Restart the program and run it with a seed value of 2182021. After the call to fill() and before the call to shuffle(), replace the value in array[26] with a -1. (Use the gdb command set var to do this.) Verify that your change is in place. After calling shuffle(), what is the subscript of the array element that contains the -1? 1 points QUESTION 7 Restart the program and run it with a seed value of 2192021. Step into the shuffle() function. When j == 7, what is the value of the expression first - array after Line 51 has been executed? 2 points QUESTION 8 Restart the program and run it with a seed value of 2202021. Step into the shuffle() function. When j == 4, what is the value of the expression second - array after Line 52 has been executed?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 Universal Database V7.1 Application Development Certification Guide

Authors: Steve Sanyal, David Martineau, Kevin Gashyna, Michael Kyprianou

1st Edition

0130913677, 978-0130913678

More Books

Students also viewed these Databases questions

Question

3. Evaluate a Web-based training site.

Answered: 1 week ago