What should be written in Q1? (Adjust nUnits) nUnits = getReverse(nRev); nUnits = 1; nUnits = 0; nUnits = nRev; O // none

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter9: Advanced Array Concepts
Section: Chapter Questions
Problem 2PE
icon
Related questions
Question
-0
FAMAS oro ag
-0
1 void printVerticalGraph(int nUnits) {
2
4
9
10
11
12
13
14
15
16
17
456
BARHEIDEN
18
19
20
21
22
23
24
25
26
27
int nRev;
printf("%d\n", nUnits);
while (nUnits>0){
nRev = getReverse (nUnits);
// 1) Adjust nUnits
?? [Q1] ??
while (nRev>0){
nUnits *= 10;
// 2) Condition to print *
if(?? [Q2]??) {
printf("*");
}
// 3) Update for nUnits for * case
?? [Q3] ??
}else{
printf(" ");
// 4) Update for nUnits for
?? [Q4]??
}
// 5) Update to nRev
?? [Q5]??
printf("\n");
case
Transcribed Image Text:-0 FAMAS oro ag -0 1 void printVerticalGraph(int nUnits) { 2 4 9 10 11 12 13 14 15 16 17 456 BARHEIDEN 18 19 20 21 22 23 24 25 26 27 int nRev; printf("%d\n", nUnits); while (nUnits>0){ nRev = getReverse (nUnits); // 1) Adjust nUnits ?? [Q1] ?? while (nRev>0){ nUnits *= 10; // 2) Condition to print * if(?? [Q2]??) { printf("*"); } // 3) Update for nUnits for * case ?? [Q3] ?? }else{ printf(" "); // 4) Update for nUnits for ?? [Q4]?? } // 5) Update to nRev ?? [Q5]?? printf("\n"); case
[CC2-1]
What should be written in Q1? (Adjust nUnits)
O nUnits = getReverse(nRev);
O nUnits = 1;
O nUnits = 0;
O nUnits = nRev;
O // none
Transcribed Image Text:[CC2-1] What should be written in Q1? (Adjust nUnits) O nUnits = getReverse(nRev); O nUnits = 1; O nUnits = 0; O nUnits = nRev; O // none
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Function Arguments
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT