subject

(a) if the following switch statement were implemented using a jump table, how many elements would the table contain?

would it make sense to use a jump table to implement this switch statement? why or why not? if not then what type of implementation will be more suitable?

why?

switch (i) {

case 40: j = a; break;

case 41: j = b; break;

case 42: j = c; break;

case 43: j = d; break;

case 44: j = e; break;

case 45: j = r; break;

case 46: j = g; break;

}

(b) answer the same questions as in part (a), using the following switch statement instead:

switch (i) {

case 20: j = a; break;

case 67: j = b; break;

case 97: j = c; break;

case 400: j = d; break;

case 310: j = e; break;

case 10: j = f; break;

}

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:30
What do character formats do for your document's message? a.set the tone b.provide organization c.provide clarity d.set how texts align with documents
Answers: 2
question
Computers and Technology, 22.06.2019 15:20
This os integrated the processing power of windows nt with the easy-to-use gui of windows 98. windows 2000 windows 3.11 windows for workgroups windowa millennium edition
Answers: 1
question
Computers and Technology, 22.06.2019 18:00
Suppose an astronomer discovers a large, spherical-shaped body orbiting the sun. the body is composed mostly of rock, and there are no other bodies sharing its orbit. what is the best way to categorize this body? a. planet b. moon c. comet d. asteroid
Answers: 1
question
Computers and Technology, 22.06.2019 20:00
Awide variety of “ apps “ are available to customize devices. which category of app does the word processing software fall into?
Answers: 2
You know the right answer?
(a) if the following switch statement were implemented using a jump table, how many elements would t...
Questions
question
Mathematics, 11.11.2020 20:30
question
History, 11.11.2020 20:30
Questions on the website: 13722360