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, 23.06.2019 02:00
Which demographic challenge is europe currently experiencing? a. an aging and decreasing population b. a baby boomc. an unequal distribution between males and females d. a large group of teenagers moving through the school system(i chose a but i'm unsure)
Answers: 1
question
Computers and Technology, 23.06.2019 09:30
Write a function called checkfactor that takes two arrays of positive numbers, firstnumberrow and secondnumberrow. checkfactor checks if the first entry in firstnumberrow is divisible by the first entry in secondnumberrow, and performs the same operation on the next array elements until all entries have been checked. all the numbers are positive and the number of entries in the arrays are the same. the function should return the identified divisible numbers in two row arrays named firstdivisible and seconddivisible.restrictions: branches or loops should not be used. the code must use the internal mod and logical functions.hint: the mod function should be used to determine if two numbers are divisible. ex: for num1 and num2 if mod(num1,num2) is 0, then the two numbers are divisible.this is matlab
Answers: 2
question
Computers and Technology, 23.06.2019 11:00
What are the possible consequences of computer hacking? what is computer piracy? describe some examples. what are the effects of computer piracy? what are the possible consequences of computer piracy? what is intentional virus setting? describe some examples. what are the effects of intentional virus setting? what are the possible consequences of intentional virus setting? what is invasion of privacy? describe some examples. what are the effects of invasion of privacy? what are the possible consequences of invasion of privacy? what is an acceptable use policy and what is the purpose of the acceptable use policy what is intellectual property and how can you use it?
Answers: 1
question
Computers and Technology, 23.06.2019 16:00
Helen is having a meeting with her colleagues in her company. they are working on the goals and objectives for the coming year. they want to ensure that these goals and objectives of the processes involved are properly evaluated. which system can helen and her colleagues apply to evaluate this? helen and her colleagues require a blank to evaluate the goals and objectives.
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
English, 02.02.2020 18:02
question
Mathematics, 02.02.2020 18:02
Questions on the website: 13722363