Rajasthan Computer Teacher Night Mock Test - Day 1 /* SCOPED: NOTHING LEAKS OUTSIDE THIS PAGE */ .mocktest-wrapper { font-family: Arial, sans-serif; background-color: #f5f5f5; padding: 30px 0; } .mocktest-wrapper .mocktest-container { max-width: 900px; margin: 0 auto; background-color: #fff; padding: 20px 30px; box-shadow: 0 4px 8px rgba(0,0,0,0.1); border-radius: 8px; } .mocktest-wrapper h1 { text-align: center; color: #333; margin-top: 0; } .mocktest-wrapper .question { margin: 20px 0; padding: 10px; border-bottom: 1px solid #ddd; } .mocktest-wrapper .question p { font-weight: bold; } .mocktest-wrapper .options label { display: block; margin: 5px 0; cursor: pointer; } .mocktest-wrapper .submit-btn { display: block; margin: 30px auto; background-color: #007bff; color: #fff; padding: 12px 30px; border: none; border-radius: 5px; cursor: pointer; font-size: 16px; } .mocktest-wrapper .submit-btn:hover { background-color: #0056b3; } .mocktest-wrapper .result { margin-top: 20px; font-weight: bold; text-align: center; } .mocktest-wrapper .correct { color: green; } .mocktest-wrapper .incorrect { color: red; } Rajasthan Computer Teacher Night Mock Test - Day 1 1. In an ER model, an entity must be: A. A real-world object B. Something that can be uniquely identified C. A physical object only D. A relationship between objects 2. A simple attribute is: A. One that can be divided B. Formed by combining multiple attributes C. One that cannot be divided further D. A repeating attribute 3. A composite attribute example: A. Age B. Full Name C. Gender D. Roll Number 4. Searching for an element in an unsorted array of size n: O(?) A. O(1) B. O(log n) C. O(n) D. O(n log n) 5. Merge two sorted arrays of size n and m using two pointers: O(?) A. O(n) B. O(n²) C. O(log n) D. O(n+m) 6. Two-pointer approach to find pair with sum = k in sorted array: O(?) A. O(n²) B. O(n) C. O(log n) D. O(1) 7. Primary key must be: A. Null sometimes B. Always unique & not null C. Composite only D. Multivalued 8. Candidate key is: A. Only one can exist B. Set of attributes that uniquely identify a tuple C. Must always be composite D. Always multivalued 9. Accessing the 5th element in an array of size n: O(?) A. O(n) B. O(1) C. O(log n) D. O(n²) 10. Reverse an array in-place of size n: O(?) A. O(1) B. O(n) C. O(log n) D. O(n²) 11. Searching in rotated sorted array using binary search: O(?) A. O(n) B. O(log n) C. O(n²) D. O(1) 12. A recursive relationship in ER model refers to: A. Entity and attribute B. Two different entities C. Same entity type D. Attribute and entity-set 13. Prefix sum query sum[l..r] after precompute: O(?) A. O(1) B. O(n) C. O(log n) D. O(n²) 14. Max element in a sorted array: O(?) A. O(1) B. O(n) C. O(log n) D. O(n²) 15. Merge k sorted arrays each of size n using min-heap: O(?) A. O(nk log k) B. O(n²) C. O(n log n) D. O(k²) 16. Partial key exists in: A. Strong Entity B. Weak Entity C. Relationship Set D. Attribute Set 17. Rotate array of size n by k positions (naive shift by 1): O(?) A. O(n) B. O(k) C. O(nk) D. O(1) 18. Maximum element in unsorted array using linear scan: O(?) A. O(n) B. O(log n) C. O(1) D. O(n²) 19. Binary search in sorted array of size n: O(?) A. O(n) B. O(log n) C. O(1) D. O(n²) 20. A surrogate key is: A. Artificial key with no business meaning B. Derived attribute C. Multivalued attribute D. Always composite Submit Test document.getElementById('mockTestForm').addEventListener('submit', function(e) { e.preventDefault(); let score = 0; const questions = document.querySelectorAll('.question'); questions.forEach(q => { const selected = q.querySelector('input[type="radio"]:checked'); const answer = q.getAttribute('data-answer'); let prev = q.querySelector('.feedback'); if (prev) prev.remove(); const feedback = document.createElement('span'); feedback.classList.add('feedback'); feedback.style.display = 'block'; if (selected) { if (selected.value === answer) { feedback.textContent = "Correct!"; feedback.classList.add('correct'); score++; } else { feedback.textContent = `Incorrect! Correct answer: ${answer}`; feedback.classList.add('incorrect'); } } else { feedback.textContent = `Not attempted! Correct answer: ${answer}`; feedback.classList.add('incorrect'); } q.appendChild(feedback); }); document.getElementById('score').textContent = `Your Score: ${score} / ${questions.length}`; });