Question 1 | MCQ
THIS IS QUESTION PAPER FOR THE SUBJECT "DEGREE LEVEL : PROGRAMMING IN C (COMPUTER BASED EXAM)"
ARE YOU SURE YOU HAVE TO WRITE EXAM FOR THIS SUBJECT?
CROSS CHECK YOUR HALL TICKET TO CONFIRM THE SUBJECTS TO BE WRITTEN.
(IF IT IS NOT THE CORRECT SUBJECT, PLS CHECK THE SECTION AT THE TOP FOR THE SUBJECTS REGISTERED BY YOU)
ARE YOU SURE YOU HAVE TO WRITE EXAM FOR THIS SUBJECT?
CROSS CHECK YOUR HALL TICKET TO CONFIRM THE SUBJECTS TO BE WRITTEN.
(IF IT IS NOT THE CORRECT SUBJECT, PLS CHECK THE SECTION AT THE TOP FOR THE SUBJECTS REGISTERED BY YOU)
Solution
What is the role of the Program Counter (PC) in the CPU?
Solution
What is the correct order of memory levels based on size (smallest to largest)?
Solution
Which of the following operators in C have right-to-left associativity?
Solution
Consider the generalized computation given below:
1. R[0] ← M[0]
2. R[1] ← M[1]
3. R[2] = R[1] - R[0]
4. If R[2] != 0, set R[1] = R[1] + 2 and go back to step 3. Otherwise, go to step 5.
5. R[2] = R[0] + R[1]
6. M[2] ← R[2]
For which value of M[0] and M[1], the computation will enter into an infinite loop?
1. R[0] ← M[0]
2. R[1] ← M[1]
3. R[2] = R[1] - R[0]
4. If R[2] != 0, set R[1] = R[1] + 2 and go back to step 3. Otherwise, go to step 5.
5. R[2] = R[0] + R[1]
6. M[2] ← R[2]
For which value of M[0] and M[1], the computation will enter into an infinite loop?
Solution
Solution
Solution
Solution
Solution
Convert the binary number 10101010 to its decimal equivalent.
Solution
Convert the hexadecimal number 0x7C5D to its equivalent decimal representation:
Solution
Solution
Which of the following is true for an 8-bit 2's complement representation?
Solution
Select all the valid variable names in C:
Solution
Consider the generalized computation given below:
1. R[0] ← M[0]
2. R[1] ← M[1]
3. R[1] = R[1] - R[0]
4. R[0] = R[0] + R[1]
5. R[1] = R[0] - R[1]
6. M[2] ← R[1]
What will be the value of M[2] at the end of computation if M[0] = 4 and M[1] = 7?
1. R[0] ← M[0]
2. R[1] ← M[1]
3. R[1] = R[1] - R[0]
4. R[0] = R[0] + R[1]
5. R[1] = R[0] - R[1]
6. M[2] ← R[1]
What will be the value of M[2] at the end of computation if M[0] = 4 and M[1] = 7?
Solution
Find the minimum number of bits required to represent an instruction set where there are 16 unique instructions, and each instruction can take at most 3 operands.
- The first operand should be able to represent 32 registers.
- The second operand should be able to represent -63 to 63 in signed magnitude form.
- The third operand is a single flag (1-bit).
- The first operand should be able to represent 32 registers.
- The second operand should be able to represent -63 to 63 in signed magnitude form.
- The third operand is a single flag (1-bit).
Solution
Solution
Shape
Thickness [ / ]
3
All colors