## Question: Problem 4. (20 pts) Determine whether function f : {NU 0} + {NUO} defined by f(x) = is a) one-to-…

Problem 4. (20 pts) Determine whether function f : {NU 0} + {NUO} defined by f(x) = is a) one-to-one b) onto. (x – 1, ifa is odd 3+1, is even

What is output of the following codes: linkedQueueType queue; queue. addQueue (2.718); queue. addQueue (1.618); queue. addQueue (3.142); queue. addQueue (0.279); queue. addQueue (queue. front() queue, back()); queue. addQueue (queue.back() * 2); queue. deleteQueue (); queue. addQueue (queue. front() / 2); linkedQueueType tempQueue = queue; tempQueue. deleteQueue (); tempQueue.deleteQueue (); while (!tempQueue.isEmptyQueue ()) { cout << queue. front() + tempQueue. front() < " "; queue. deleteQueue (); tempQueue.deleteQueue ();

## Question: 17. The output of the following code is 2 4. Which of the following correctly replaces the missin…

17. The output of the following code is 2 4. Which of the following correctly replaces the missing lines in the code? #indude void f(int *ptr) { int y = 2; ptr = &y; //line1 } main() { int x = 4, *ptr; ptr = &x; f(8x); Illine2 } 0 Linel: printf(“%d”, *ptr); and Line2: printf(“%d”, *ptr); (ii) Linel: printf(“%d”,y); and Line2: printf(“%d”, *ptr); (li) Linei: printf(“%d”, *ptr); and Line2: printf(“%d”,x); (iv) Linel: printf(“%d”,y); and Line2: printf(“%d”, x); (4 Points) (iv) only () only OOOO () and (ii) only All of them

## Question: Which is the sequence of instructions needed to push registers \$ra and \$s0 onto the stack. addi \$…

Which is the sequence of instructions needed to push registers \$ra and \$s0 onto the stack. addi \$sp,\$sp,-8 sw \$ra,(\$sp) sw \$50,4(\$sp) O lw \$ra,(\$sp) lw \$50,4(\$sp) addi \$sp,\$sp,8 None of the mentioned

## Question: For an InGaAsP LED operating at a wavelength of 1550 nanometer with internal quantum efficiency o…

For an InGaAsP LED operating at a wavelength of 1550 nanometer with internal quantum efficiency of 0.8. For internal power Pint of 20 milliWatt, what will be the injection current? Select one: a.,40 mA b. 31.3 mA c. 0.0391 A d. 39.1 mA

## Question: Java code. Define a class of objects that represent a location. Each object should contain an int…

Java code. Define a class of objects that represent a location. Each object should contain an integer x,y coordinate pair, and a string to label the location. Write a constructor, some getter methods, and a toString method. 1

## Question: (k) (2 points) A computer bus consists of data linies, control lines and power lines. True O Fals…

(k) (2 points) A computer bus consists of data linies, control lines and power lines. True O False .. (1) (2 points) An x86-64 CPU cannot address a separate byte of memory. O True O False 25 (m) (2 points) Stack overflow typically occurs when we are trying to push a value of the incorrect type on the stack. False O True (n) (2 points) A 100-stage pipeline can theoretically provide 100.1 times speedup. O True False fo) (2 points) Size of the CPU Li cache is typically about 5% of the RAM size. O True False (P) (2 points (bonus)) The following is the correct Hamining code fodd parity) for the hexadecimal digit A (Note: you won’t get points without explanation: 1010010 The False (0) (1 point (bonus) The modem Intel Xeon processors have 1A6! architecture [Note: you won’t get points without explanation: True FARO