Computer Fundamentals MCQs | part-2 with Explanations * { margin: 0; padding: 0; box-sizing: border-box; } body { background: #f1f5f9; font-family: 'Segoe UI', 'Inter', system-ui, -apple-system, sans-serif; padding: 2rem 1rem; color: #0f172a; } .container { max-width: 1100px; margin: 0 auto; } .quiz-header { background: linear-gradient(135deg, #0f2b3d 0%, #1e4a6e 100%); border-radius: 1.5rem; padding: 1.5rem 2rem; margin-bottom: 2rem; color: white; box-shadow: 0 10px 20px -5px rgba(0,0,0,0.2); } .quiz-header h1 { font-size: 1.8rem; font-weight: 700; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; } .badge { background: #f59e0b; color: #0f2b3d; font-size: 0.85rem; padding: 4px 14px; border-radius: 40px; font-weight: 600; } .sub { margin-top: 10px; opacity: 0.85; font-size: 0.9rem; } /* ====== FIXED STATS BAR (single definition) ====== */ .stats-bar { background: #fff; border-radius: 60px; padding: 14px 20px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 25px; box-shadow: 0 4px 12px rgba(0,0,0,0.08); border: 1px solid #e5e7eb; } .progress { background: #eef2ff; color: #1e3a8a; padding: 24px 24px; border-radius: 30px; font-size: 12px; font-weight: 600; } .score { background: #fef3c7; color: #92400e; padding: 8px 18px; border-radius: 30px; font-size: 15px; font-weight: 600; } .reset-btn { background: #ef4444; color: #fff; border: none; padding: 10px 20px; border-radius: 30px; cursor: pointer; font-weight: 600; transition: 0.3s; } .reset-btn:hover { background: #dc2626; transform: translateY(-2px); } /* ====== MEDIA QUERY ====== */ @media (max-width: 768px) { .stats-bar { flex-direction: column; border-radius: 20px; text-align: center; } .progress, .score, .reset-btn { width: 100%; } } /* ====== QUESTIONS SECTION ====== */ .questions-grid { display: flex; flex-direction: column; gap: 1.5rem; } .card { background: white; border-radius: 1.25rem; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); overflow: hidden; border: 1px solid #e2edf7; } .card-header { background: #fafcff; padding: 1rem 1.5rem; border-bottom: 2px solid #eef2ff; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; align-items: baseline; } .q-num { font-weight: 800; color: #0f3b5c; font-size: 1rem; } .q-text { font-weight: 600; color: #0c4a6e; font-size: 1rem; line-height: 1.4; flex: 1; } .options-area { padding: 1.2rem 1.5rem 0.8rem 1.5rem; display: flex; flex-direction: column; gap: 0.7rem; } .option { display: flex; align-items: center; gap: 14px; background: #ffffff; padding: 8px 16px; border-radius: 60px; border: 1px solid #dee7f0; cursor: pointer; transition: all 0.15s; } .option:hover { background: #f8fafc; border-color: #94a3b8; } input[type="radio"] { accent-color: #2563eb; width: 18px; height: 18px; cursor: pointer; } .option-label { font-weight: 500; color: #1e293b; flex: 1; cursor: pointer; font-size: 0.95rem; } .card-footer { padding: 0.8rem 1.5rem 1.3rem 1.5rem; background: #fefefe; border-top: 1px solid #eef2ff; display: flex; flex-direction: column; gap: 12px; } .feedback { font-size: 0.85rem; font-weight: 600; padding: 6px 14px; border-radius: 30px; display: inline-block; width: fit-content; } .feedback.correct { background: #d1fae5; color: #065f46; } .feedback.wrong { background: #fee2e2; color: #991b1b; } .feedback.neutral { background: #f1f5f9; color: #475569; } .explanation { background: #f0f9ff; padding: 12px 16px; border-radius: 1rem; font-size: 0.85rem; color: #0369a1; border-left: 4px solid #0ea5e9; display: none; } .explanation.show { display: block; } .explanation strong { color: #0c4a6e; } .toggle-explanation { background: none; border: none; color: #3b82f6; font-weight: 600; font-size: 0.75rem; cursor: pointer; padding: 4px 12px; border-radius: 20px; transition: 0.1s; } .toggle-explanation:hover { background: #eef2ff; text-decoration: underline; } .action-bar { display: flex; justify-content: flex-start; align-items: center; flex-wrap: wrap; gap: 10px; } @media (max-width: 700px) { .quiz-header h1 { font-size: 1.3rem; } .option { padding: 6px 12px; } } footer { text-align: center; margin-top: 2rem; font-size: 0.75rem; color: #5b6e8c; background: transparent; } 📚 MCQ Part 2 with Explanations Based on UPPCL, competitive exams — Input devices, Memory, Number Systems, Binary, Computer Organization 📋 Attempted: 0 / 23 ⭐ Score: 0 ⟳ Reset All ✅ Click on any option to answer • Use "Show Explanation" to understand concept • Answers auto-save locally const questions = [ { id: 23, text: "Touchpad is a good alternative to the mouse, it is an example of ______", options: ["Software device", "Printing device", "Pointing device", "Temporary device"], correct: "Pointing device", explanation: "A touchpad detects finger movement and position to move the cursor, making it an input and specifically a pointing device, just like a mouse or trackball." }, { id: 24, text: "The technology of scanning that recognizes handwritten text and printed text is.", options: ["MICR", "OMR", "OCR", "BCR"], correct: "OCR", explanation: "OCR (Optical Character Recognition) converts images of handwritten or printed text into machine-encoded text. MICR is for cheques, OMR for bubble sheets, BCR for barcodes." }, { id: 25, text: "The technology of scanning that reads the check boxes contained inside a predefined space is", options: ["BCR", "OCR", "OMR", "MICR"], correct: "OMR", explanation: "OMR (Optical Mark Recognition) detects marks like filled bubbles or checkboxes in specific positions, commonly used in answer sheets and surveys." }, { id: 26, text: "Which of the following input devices utilizes a light sensitive detector to select an object on a display screen?", options: ["OMR", "Light pen", "Scanner", "Printer"], correct: "Light pen", explanation: "A light pen contains a photocell (light-sensitive detector). When touched to a CRT screen, it detects the light emitted by the phosphors to identify its position." }, { id: 27, text: "Which input device converts analog information into digital form and can be used for doing fine works of drawing and image manipulation?", options: ["Microphone", "Bar Code Reader", "Digitizer", "Graphic Plotter"], correct: "Digitizer", explanation: "A digitizer (graphics tablet) converts analog hand movements into digital signals, ideal for precise drawing, CAD, and photo editing." }, { id: 28, text: "Full form of ASCII is", options: ["American Scientific code for Interchange of Information", "American Scientific code for Information Interchange", "American Standard code for Information Interchange", "Altruistic Scientific Code For information Interchange"], correct: "American Standard code for Information Interchange", explanation: "ASCII is the standard character encoding for electronic communication, mapping letters, digits, and symbols to numbers 0-127." }, { id: 29, text: "Which among the following describes ROM?", options: ["Read Only Memory", "Read Once Memory", "Read On Memory", "Read Other Memory"], correct: "Read Only Memory", explanation: "ROM (Read Only Memory) is non-volatile memory used to store firmware that is permanently written and can only be read by normal operations." }, { id: 30, text: "Which of the following is a volatile memory?", options: ["RAM", "CD-ROM", "ROM", "EPROM"], correct: "RAM", explanation: "Volatile memory loses data when power is turned off. RAM is volatile, whereas ROM, CD-ROM, and EPROM are non-volatile." }, { id: 31, text: "Which of the following is NOT a characteristic of RAM?", options: ["Faster", "Expensive", "High power consumption", "Smaller"], correct: "High power consumption", explanation: "RAM is fast, relatively expensive per GB, and physically smaller than hard drives. High power consumption is not a defining characteristic; modern RAM is energy efficient compared to other components." }, { id: 32, text: "Which of the following is a characteristic of the modern digital computer?", options: ["High speed", "Large storage capacity", "Greater accuracy", "All of the above"], correct: "All of the above", explanation: "Modern digital computers are known for high speed (GHz), large storage (terabytes), and greater accuracy (error-free arithmetic)." }, { id: 33, text: "Which of the following was the first pure electronic programmable computer developed in the year 1944/1945?", options: ["MARK1", "ENIAC", "Colossus", "EDVAC"], correct: "ENIAC", explanation: "ENIAC (1945) was the first general-purpose, fully electronic programmable computer. Colossus (1943) was specialized for code-breaking, MARK1 was electromechanical." }, { id: 34, text: "Which of the following unit is a part of the CPU?", options: ["ALU", "CU", "Memory Unit", "All of the above"], correct: "All of the above", explanation: "The CPU consists of ALU (Arithmetic Logic Unit), CU (Control Unit), and Memory Unit (registers & cache)." }, { id: 35, text: "What is the full form of RAM?", options: ["Dynamic Remote Access Memory", "Random Access Memory", "Remote Access Memory", "Remote Access Memory"], correct: "Random Access Memory", explanation: "RAM stands for Random Access Memory, allowing the CPU to access any memory location directly in constant time." }, { id: 36, text: "Which of the following is not considered hardware?", options: ["Operating system", "CPU", "Keyboard", "Hard disk"], correct: "Operating system", explanation: "The Operating System (e.g., Windows, Linux) is software — a collection of programs. CPU, Keyboard, and Hard disk are physical hardware components." }, { id: 37, text: "Which of the following is exclusively a sequential access storage device?", options: ["Hard disk", "Floppy disk", "Magnetic tape", "DVD"], correct: "Magnetic tape", explanation: "Magnetic tape reads/writes data sequentially from start to end. Hard disks, floppy disks, and DVDs support direct (random) access." }, { id: 38, text: "What is the full form of SRAM?", options: ["Static Random Access Memory", "Static Remote Access Memory", "Setup Random Access Memory", "Setup Remote Access Memory"], correct: "Static Random Access Memory", explanation: "SRAM (Static RAM) uses flip-flops to store each bit and does not need periodic refreshing; it is faster and more expensive than DRAM." }, { id: 39, text: "Which of the following is not a form data storage media?", options: ["A database", "Magnetic tape", "Magnetic disk", "Optical disc"], correct: "A database", explanation: "A database is software/organized collection of data stored on media. Magnetic tape, disk, and optical disc are physical storage media." }, { id: 40, text: "Which of the following language does the computer understand?", options: ["Computer understands only C language", "Computer understands only Assembly language", "Computer understands only Binary language", "Computer understands only BASIC"], correct: "Computer understands only Binary language", explanation: "The CPU directly understands Machine Language (binary 0s and 1s). High-level languages need compilation or interpretation." }, { id: 41, text: "Which of the following computer language is written in binary codes only?", options: ["Pascal", "Machine language", "C", "C#"], correct: "Machine language", explanation: "Machine language consists purely of binary instructions. All other languages are human-readable and must be translated into machine code." }, { id: 42, text: "Which of the following unit is responsible for converting the data received from the user into a computer understandable format?", options: ["Output Unit", "Input Unit", "Memory Unit", "Arithmetic & Logic Unit"], correct: "Input Unit", explanation: "The Input Unit converts user data (key presses, mouse movements) into binary format that the computer can process." }, { id: 43, text: "Convert 89 into binary notation.", options: ["1100110", "101110", "1011011", "1011001"], correct: "1011001", explanation: "89 decimal to binary: 89 = 64+16+8+1 = 1011001₂. (Check: 64+0+16+8+0+0+1 = 89)" }, { id: 44, text: "Addition of binary number 10011 and 11101 are.", options: ["11000", "10000", "10001", "110000"], correct: "110000", explanation: "Binary addition: 10011 + 11101 = 110000. (19 + 29 = 48 decimal, binary 110000). Column-wise with carry: 1+1=0 carry1, etc." }, { id: 45, text: "The binary representation of 99.25 is.", options: ["(1100011.10)₂", "(1100011.01)₂", "(1101011.10)₂", "(1000011.11)₂"], correct: "(1100011.01)₂", explanation: "99 = 1100011₂; fractional 0.25 = .01₂ (0.25×2=0.5→0, 0.5×2=1→1). So 1100011.01₂ = 64+32+0+0+0+2+1 + 0.25 = 99.25." } ]; let answersState = {}; function initState() { for (let q of questions) { if (!answersState[q.id]) { answersState[q.id] = { selected: null, showExplanation: false }; } } } initState(); function getStats() { let attempted = 0, correct = 0; for (let q of questions) { const ans = answersState[q.id].selected; if (ans && ans !== "") { attempted++; if (ans === q.correct) correct++; } } return { attempted, correct }; } function updateUIStats() { const { attempted, correct } = getStats(); document.getElementById('attemptCount').innerHTML = `📋 Attempted: ${attempted} / 23`; document.getElementById('scoreValue').innerHTML = `⭐ Score: ${correct}`; } function renderQuestions() { const container = document.getElementById('questionsContainer'); if (!container) return; let html = ''; for (let q of questions) { const state = answersState[q.id]; const selectedVal = state.selected || ""; const showExp = state.showExplanation; let feedbackText = "", feedbackClass = "neutral"; if (selectedVal !== "") { if (selectedVal === q.correct) { feedbackText = "✓ Correct"; feedbackClass = "correct"; } else { feedbackText = `✗ Incorrect · Correct: ${q.correct}`; feedbackClass = "wrong"; } } else { feedbackText = "⚡ Not attempted yet"; feedbackClass = "neutral"; } let optionsHtml = ''; q.options.forEach(opt => { const escapedOpt = opt.replace(/'/g, "\\'").replace(/"/g, '"'); const radioId = `q${q.id}_opt_${opt.replace(/\s/g, '').replace(/[\(\)]/g, '')}`; const checkedAttr = (selectedVal === opt) ? 'checked' : ''; optionsHtml += ` ${opt} `; }); const explanationClass = showExp ? "show" : ""; html += ` Q${q.id}. ${q.text} ${optionsHtml} ${feedbackText} ${showExp ? "Hide Explanation" : "📖 Show Explanation"} 💡 Explanation: ${q.explanation} `; } container.innerHTML = html; updateUIStats(); document.querySelectorAll('.toggle-explanation').forEach(btn => { const qid = parseInt(btn.getAttribute('data-id')); btn.removeEventListener('click', (e) => {}); btn.addEventListener('click', (e) => { e.stopPropagation(); toggleExplanation(qid); }); }); } window.selectAnswer = function(qid, selectedValue) { answersState[qid].selected = selectedValue; renderQuestions(); saveToLocalStorage(); }; function toggleExplanation(qid) { answersState[qid].showExplanation = !answersState[qid].showExplanation; renderQuestions(); saveToLocalStorage(); } function resetQuiz() { for (let q of questions) { answersState[q.id] = { selected: null, showExplanation: false }; } renderQuestions(); saveToLocalStorage(); } function saveToLocalStorage() { const toSave = {}; for (let q of questions) { toSave[q.id] = { selected: answersState[q.id].selected, showExplanation: answersState[q.id].showExplanation }; } localStorage.setItem('quizMCQ_set2', JSON.stringify(toSave)); } function loadFromLocalStorage() { const saved = localStorage.getItem('quizMCQ_set2'); if (saved) { try { const parsed = JSON.parse(saved); for (let id in parsed) { const qid = parseInt(id); if (answersState[qid]) { answersState[qid].selected = parsed[id].selected || null; answersState[qid].showExplanation = parsed[id].showExplanation || false; } } renderQuestions(); } catch(e) {} } else { renderQuestions(); } } document.getElementById('resetAll')?.addEventListener('click', () => { resetQuiz(); }); loadFromLocalStorage();