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

Assume current working directory is home directory (/Home), which is not in the

ID: 3810535 • Letter: A

Question

Assume current working directory is home directory (/Home), which is not in the PATH variable. To execute the C program test in current working directory, we can run the command: (a)/Home/test b) ./test (c) Home/test d) test Read following C program, and answer question 8) to 9) int func (int x, int y) {int count = 0; return x >> y ? 1:0; What value will be returned if the function call is func(8, 3)? (a) 0 (b) 1 (c) 2 (d) None of above What does the function func do? (a) Count if the number of nonzero digits in its decimal representation equals to a given number. (b) Check if a given bit position is set to one or not in the binary representation of a number. (c) Count the number of 1's in its binary representation equals to a given number. (d) None of above Which statement below is not equivalent to the other three (assuming that the loop bodies are the same) ? a) for (i = 0; i

Explanation / Answer

7) b "in unix ./(dot) represents present working directory"

8) b here 8 is getting binary shifted to 3 bits right side and this operation is possible so it returns 1. ( L.H.S should be greater than R.H.S)

9) d "this operation in binary right shift"

10) c and d are the same here and other two are same

11) a

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