subject

Void printnum(int num) //line 1
{ //line 2
if (n < 0) //line 3
cout < < "num is negative" < < endl; //line 4
else if (num == 0) //line 5
cout < < "num is zero" < < endl; //line 6
else //line 7
{ //line 8
cout < < num < < " "; //line 9
printnum(num – 1); //line 10
} //line 11
} //line 12

consider the accompanying definition of a recursive function. which of the statements represent the base case?

(a)-statements in lines 3 and 4
(b)-statements in lines 5-10
(c)-statements in lines 3-6
(d)-statements in lines 5 and 6

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 04:30
There is a simple pattern for determining if a binary number is odd. what is it and why does this pattern occur? how many bits would you need if you wanted to have the ability to count up to 1000? how high could you count in binary if you used all 10 of your fingers as bits? (finger up means 1, finger down means 0)
Answers: 3
question
Computers and Technology, 22.06.2019 08:10
Alook-up table used to convert pixel values to output values on a monitor. essentially, all pixels with a value of 190 or above are shown as white (i.e. 255), and all values with a value of 63 or less are shown as black (i.e. 0). in between the pixels are scaled so that a pixel with a value p is converted to a pixel of value 2/127 −+3969). if a pixel has a value of 170 originally, what value will be used to display the pixel on the monitor? if a value of 110 is used to display the pixel on the monitor, what was the original value of the pixel?
Answers: 1
question
Computers and Technology, 22.06.2019 09:50
17. implement the jvm dload instruction for the mic-2. it has a 1-byte index and pushes the local variable at this position onto the stack. then it pushes the next higher word onto the stack as well
Answers: 2
question
Computers and Technology, 22.06.2019 16:00
Why should characters such as / \ " ' * ; - ? [ ] ( ) ~ ! $ { } < > # @ & | space, tab, and newline be avoided in file names?
Answers: 2
You know the right answer?
Void printnum(int num) //line 1
{ //line 2
if (n < 0) //line 3
cout < <...
Questions
question
Mathematics, 02.07.2019 16:10
question
Mathematics, 02.07.2019 16:10
Questions on the website: 13722362