please answer these true and false. make sure your answers are correct and I pro
ID: 3726579 • Letter: P
Question
please answer these true and false. make sure your answers are correct and I promise to give you a thumbs up
11) TRUE FALSE For an array named A of size 100 to go to A(5] requires one multiplication and one addition 12) TRUE FALSEFor an array named A of size 100 to go to A[80] requires one multiplication and one addition. 13) TRUE FALSE For linked list with 100 nodes, to go to the node which is 80 nodes from the head requires one multiplication and one addition. 14) TRUE FALSE For a linked list with 100 nodes, to go to the node 3 nodes from the head requires one multiplication and one additionExplanation / Answer
If you have any problems with the answer or want me to edit the answer, just let me know in the comments and I will try to get on to it as soon as possible. Do give a positive rating if you think this answer helped.
1. We know the base address and size (100).
And to go A[5], we use formula :
Base+(size)*5
Which has one multiplication and one addition.
Hence the given statement is TRUE.
2. Similarly for second part we have
Base+(size)*80
Once again one multiplication and one addition. Hence the given statement is TRUE.
3. In the linked list, the memory allocation is not Sequential. So we can't use the formula like above. Hence the given statement is FALSE.
4. The given statement is also FALSE, due to same given as question 3.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.