Long Questions (20*2=40 Marks)
1. What types of machine learning tasks are speech recognition and movie rating prediction, respectively?
Classification and regression
Regression and classification
Clustering and regression
Classification and clustering
Question 2: In C++, what is the output of the following code snippet?
A
B
AB
no output
3. What is the value of the current I when v = 12V and v1 = 20V?
6A
8A
2A
4A
4. Given the production rules: Rule 1: S -> aSb and S -> e Rule 2: R -> cRd and R -> e How many production rules start with different alphabets in S union R?
6A
8A
2A
4A
5. What is the correct order of precedence for logical operators?
Negation, AND, OR, Implication, Bidirectional
AND, Negation, OR, Implication, Bidirectional
OR, AND, Negation, Implication, Bidirectional
Bidirectional, AND, OR, Implication, Negation
6. In a half adder, which logic gate represents the carry?
OR
AND
NAND
NOT
7. In the demand paging memory, a page table is held in registers. If it takes 1000 ms to service a page fault and if the memory access time is 10 ms, what is the effective access time for a page fault rate of 0.01?
12.9 ms
20.9 ms
19.9 ms
0.01 ms
8. A company purchases a piece of equipment for $10,000. The equipment has a useful life of 5 years with no salvage value at the end of its useful life. Calculate the annual depreciation percentage.
9%
15%
10%
20%
9. What does the C function call fwrite(str, strlen(str) + 1, 1, filePointer)
do?
fwrite(str, strlen(str) + 1, 1, filePointer)
do?a) Prints all string characters including the null character b) Prints all string characters except the null character c) Writes the length of the string to the file d) Writes the string length plus one to the file
10. What do building codes and bylaws primarily represent?
a) Design standards b) Construction materials c) Environmental regulations d) Safety procedures
11. For a 4M-bit chip with 19 external connectors and 8-bit data lines, how many address lines are there?
a) 8 b) 16 c) 19 d) 20
12. What is the result of 64 mod 23?
a) 18 b) 20 c) 21 d) 23
13. In a class B amplifier, what happens to voltage gain and impedance when capacitance is added to the emitter terminal?
a) Both voltage gain and impedance increase b) Voltage gain increases, impedance decreases c) Voltage gain decreases, impedance increases d) Both voltage gain and impedance decrease
14. In a tree traversal problem, which node is visited last in postorder when converting from preorder 30, 20, 10, 15, 25, 23, 39, 35, 42?
a) 10 b) 15 c) 23 d) 30
15. In which region of a positively biased circuit does the Q-point typically lie?
Saturation
Active
Cut-off
Center
16. What are the three main phases of object-oriented development?
Analysis, Design, Testing
Object-oriented analysis, object-oriented design, object-oriented programming
Requirement gathering, Implementation, Deployment
Planning, Execution, Maintenance
17. What are the key components of a search problem in artificial intelligence?
Initial state, successor function, goal state, path cost
Initial state, successor function, goal path, goal test
Initial state, actions, goal state, search space
Initial state, goal state, heuristic function, solution
18. What is the default access specifier for data members in a C++ class?
Public
Protected
Private
None
19. What concept in object-oriented programming allows objects of different classes to be treated as objects of a common base class?
Encapsulation
Inheritance
Polymorphism
Abstraction
20. Which is not a property of representation of knowledge?
Representational Verification
Completeness
Consistency
Efficiency
Last updated