Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Question 2]. ANSWER THE FOLLOWING CLEARLY .a) How much Memory in bytes required

ID: 2293850 • Letter: Q

Question

Question 2]. ANSWER THE FOLLOWING CLEARLY .a) How much Memory in bytes required to store the string: AaBbCcDdEeFfGgHhjkKKKKKLLLLLL 128 times, following Unicode. What would be the memory size in bytes, if ASCIl code is used instead of Unicode? .a) memory in bytes for Unicode- for ASCII- .b) In the following functional loop count, sum, and product are unsigned integers, total - -20; sum -10; How many times the for loop is run? What are the end values of count, total and sum? for (count 30;count 16; count-3) (total count); (sum +total); .b (loop is run)e end values: count---to tal um___ .c) j and p are integers with initial values j - 2; p 8; while U 8) )// end while loop c) What are final values of j and p after the conclusion of the while loop? d) double f ((2+rand()%7)/2.5); what are the possible values for fr? d) possible values for fr .e) double D[1200] array has been declared Dptr&D;[e];Dptr decimal value: 2676960; What are the addresses of elements: D[100] and the last element of the array D[]. e) address of :D100,. last element:

Explanation / Answer

a).For UNICODE encoding,Number of bits used to encode a single character = 16.

30 Character and 128 times,So total character = 128*30

to Number of byte = 128*30*16/8 = 7680bytes.

For ASCII encoding,Number of bits used to encode a single character = 8.

30 Character and 128 times,So total character = 128*30

to Number of byte = 128*30*8/8 = 3840bytes.

b). loop is run = 5 times, End value count = 18. total = -140, Sum = -150.

c). p=172 , j=10

d).rand() % 7 random number from 0 to 6.

2 + rand() % 7 random number from 2 to 8.

(2 + rand() % 7)/2.5 random number from 0.8 to 3.2 .. ..  

So fr =   random number from 0.8 to 3.2

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote