InterviewSolution
Saved Bookmarks
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
The number 43 in 2’s complement representation is(A) 01010101(B) 11010101(C) 00101011(D) 10101011 |
| Answer» | |
| 2. |
Given the following expression grammar:E -> E * F | F + E | FF -> F - F | id which of the following is true?(A) * has higher precedence than +(B) – has higher precedence than *(C) + and — have same precedence(D) + has higher precedence than * |
| Answer» None | |
| 3. |
Let a, b, c, d be propositions. Assume that the equivalences a ↔ (b V-b) and b ↔ c hold. Then the truth value of the formula (a ∧ b) → (a ∧ c) ∨ d) is always(A) True(B) False(C) Same as the truth value of b(D) Same as the truth value of d |
| Answer» | |
| 4. |
In SQL, relations can contain null values, and comparisons with null values are treated as unknown. Suppose all comparisons with a null value are treated as false. Which of the following pairs is not equivalent?(A) x = 5 AND not(not(x = 5))(B) x = 5 AND x> 4 and x < 6, where x is an integer(C) x ≠ 5 AND not (x = 5)(D) None of the above |
| Answer» | |
| 5. |
Suppose you are given an array s[1..n] and a procedure reverse (s, i, j) which reverses the order of elements in a between positions i and j (both inclusive). What does the following sequence do, where 1 <= k <= n:reverse(s, 1, k) ;reverse(s, k + 1, n);reverse(s, l, n); (A) Rotates s left by k positions(B) Leaves s unchanged(C) Reverses all elements of s(D) None of the above |
| Answer» | |
| 6. |
Given the relationsemployee (name, salary, deptno) anddepartment (deptno, deptname, address)Which of the following queries cannot be expressed using the basic relational algebra operations (U, -, x, , , p)?(A) Department address of every employee(B) Employees whose name is the same as their department name(C) The sum of all employees’ salaries(D) All employees of a given department |
| Answer» | |
| 7. |
Let LASTPOST, LASTIN and LASTPRE denote the last vertex visited in a postorder, inorder and preorder traversal, respectively, of a complete binary tree. Which of the following is always true?(A) LASTIN = LASTPOST(B) LASTIN = LASTPRE(C) LASTPRE = LASTPOST(D) None of the above |
| Answer» | |