UPSSSC & UPPCL Previous Year Exam Quiz | Computer Fundamentals * { margin: 0; padding: 0; box-sizing: border-box; } body { background: linear-gradient(145deg, #e9f0f5 0%, #d9e2ec 100%); font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif; padding: 2rem 1rem; color: #1a2c3e; } .container { max-width: 1100px; margin: 0 auto; background: rgba(255, 255, 255, 0.92); border-radius: 2rem; box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.25); backdrop-filter: blur(0px); overflow: hidden; transition: all 0.2s; } /* header */ .quiz-header { background: #0f2b3d; padding: 1.6rem 2rem; color: white; border-bottom: 5px solid #ffb74d; } .quiz-header h1 { font-size: 1.9rem; letter-spacing: -0.5px; font-weight: 700; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; } .quiz-header h1 span { background: #ffb74d; font-size: 1rem; padding: 4px 12px; border-radius: 40px; color: #0f2b3d; font-weight: 600; } .subhead { margin-top: 10px; opacity: 0.85; font-size: 1rem; font-weight: 400; } /* stats & controls */ .stats-bar { display: flex; justify-content: space-between; align-items: center; background: #f4f7fc; padding: 0.9rem 2rem; border-bottom: 1px solid #cfdfed; flex-wrap: wrap; gap: 12px; } .progress-badge { background: #1e4663; color: white; padding: 6px 14px; border-radius: 40px; font-weight: 600; font-size: 0.9rem; } .score-area { background: #eef2f7; padding: 6px 16px; border-radius: 32px; font-weight: 700; color: #0f2b3d; box-shadow: inset 0 0 0 1px #cddae9; } .reset-btn { background: #ffb74d; border: none; padding: 6px 20px; border-radius: 40px; font-weight: bold; cursor: pointer; font-size: 0.9rem; transition: 0.2s; color: #1e2f3c; box-shadow: 0 1px 3px rgba(0,0,0,0.1); } .reset-btn:hover { background: #ffa01e; transform: scale(0.97); box-shadow: 0 1px 2px black; } /* questions grid */ .questions-grid { padding: 2rem; display: flex; flex-direction: column; gap: 1.8rem; } .question-card { background: white; border-radius: 1.5rem; box-shadow: 0 5px 12px rgba(0, 0, 0, 0.05); transition: 0.1s linear; border: 1px solid #e2edf7; overflow: hidden; } .question-title { background: #f8fafd; padding: 1rem 1.5rem; border-bottom: 1px solid #e2edf7; font-weight: 700; font-size: 1.05rem; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: baseline; } .q-text { color: #1c3b4f; } .exam-ref { font-size: 0.7rem; background: #e4edf5; padding: 3px 10px; border-radius: 30px; font-weight: normal; color: #2c5a7a; } .options { padding: 1.2rem 1.5rem 1.5rem 1.5rem; display: flex; flex-direction: column; gap: 12px; } .option { display: flex; align-items: center; gap: 14px; background: #ffffff; padding: 8px 12px; border-radius: 60px; border: 1px solid #dce7f0; transition: 0.1s; cursor: pointer; } .option:hover { background: #f5f9ff; border-color: #96b8d4; } input[type="radio"] { accent-color: #1e6f5c; width: 18px; height: 18px; cursor: pointer; } .option-label { font-weight: 500; color: #1e4663; letter-spacing: 0.2px; flex: 1; cursor: pointer; } /* feedback & status */ .card-footer { display: flex; justify-content: space-between; align-items: center; padding: 0.7rem 1.5rem 1.3rem 1.5rem; border-top: 1px solid #eef3fa; background: #fefefe; flex-wrap: wrap; gap: 12px; } .feedback { font-size: 0.8rem; font-weight: 500; padding: 4px 12px; border-radius: 24px; } .feedback.correct { background: #d1fae5; color: #0b5e42; } .feedback.wrong { background: #ffe6e5; color: #b91c1c; } .feedback.neutral { background: #f0f4f9; color: #4b6f8c; } .show-answer { background: none; border: none; color: #2c7da0; font-weight: 600; font-size: 0.75rem; cursor: pointer; padding: 4px 12px; border-radius: 30px; transition: 0.1s; } .show-answer:hover { background: #e6f0f8; text-decoration: underline; } .answer-hint { font-size: 0.75rem; margin-left: 10px; color: #1f6392; } hr { margin: 10px 0; } @media (max-width: 700px) { .questions-grid { padding: 1rem; } .quiz-header h1 { font-size: 1.4rem; } .option { flex-wrap: wrap; } } footer { text-align: center; padding: 1rem; font-size: 0.75rem; color: #4f6f8f; border-top: 1px solid #cbdbe2; background: #f9fcff; } 💻 Previous Year Exam Vault 22 MCQs UPSSSC JE (2015-16) • UPPCL JE • VDO • Stenographer • Revenue & Sugarcane Inspector 📋 Attempted: 0 / 22 ⭐ Score: 0 ⟳ Reset All Answers 📌 Based on UPSSSC, UPPCL official papers (2015-2019). Click on options to answer, use "Show Ans" for quick revision. // ---------- Questions dataset (22 items from PDF) ---------- const questionsData = [ { id: 1, text: "The main parts of computer are", options: ["6", "7", "8", "9"], correct: "8", exam: "UPSSSC JE-2016" }, { id: 2, text: "The main purpose of software is to convert data into", options: ["Website", "Information", "Program", "Object"], correct: "Information", exam: "UPSSSC JE-2015" }, { id: 3, text: "Which of the following control memory, input and output devices?", options: ["C.P.U.", "A.L.U.", "C.U.", "Memory"], correct: "C.U.", exam: "UPSSSC JE-2016" }, { id: 4, text: "High power micro processors are", options: ["Pentium, Pentium pro", "Pentium II and III", "Pentium II", "all of these"], correct: "all of these", exam: "UPSSSC JE-2016" }, { id: 5, text: "Where was the first computer in India installed?", options: ["Tata Institute of Fundamental Research, Mumbai", "Indian Statistical Institute, Kolkata", "Computational Research Laboratory (CRL), Pune", "Indian Railway, New Delhi"], correct: "Tata Institute of Fundamental Research, Mumbai", exam: "UPSSSC Sugarcane Sup.-2016" }, { id: 6, text: "First mini computer was", options: ["PDP-8", "ENIAC", "UNISAC", "EDVAC"], correct: "PDP-8", exam: "UPSSSC JE-2016" }, { id: 7, text: "What name has been given to the first super computer made in India?", options: ["Akash", "Param", "Arjun", "Siddharth"], correct: "Param", exam: "UPSSSC JE-2015" }, { id: 8, text: "Name of super computer is", options: ["CRAY-2", "CRAY XMP-24", "Tianhe-2", "All of above"], correct: "All of above", exam: "UPSSSC JE-2016" }, { id: 9, text: "Example of input devices is", options: ["Mouse", "Joystick", "Trackball", "all of these"], correct: "all of these", exam: "UPSSSC JE-2016" }, { id: 10, text: "Type of keyboard is", options: ["Serial keyboard", "Parallel keyboard", "Both (a) and (b)", "None of these"], correct: "Both (a) and (b)", exam: "UPSSSC JE-2016" }, { id: 11, text: "How many keys are there on keyboard for alphabet?", options: ["24", "25", "26", "27"], correct: "26", exam: "UPSSSC JE-2015" }, { id: 12, text: "Computer Mouse is this kind of Device?", options: ["Input", "Output", "Software", "Storage"], correct: "Input", exam: "UPSSSC JE 2015" }, { id: 13, text: "Which of the following devices is used to recognize a pre-specified type of mark by pencil or pen?", options: ["Bar-Code Reader", "OCR", "Scanner", "OMR"], correct: "OMR", exam: "UPSSSC JE-2016" }, { id: 14, text: "Screen or Monitor Devices is", options: ["Hard copy", "Soft copy", "Input devices", "Display devices"], correct: "Display devices", exam: "UPSSSC JE-2016" }, { id: 15, text: "Permanent Memory of a computer is known as-", options: ["RAM", "CD-ROM", "ROM", "CPU"], correct: "ROM", exam: "UPSSSC VDO-2016" }, { id: 16, text: "Full name of EPROM is", options: ["Erasable Programmable Read Only Memory", "Electronic Programmable Read Only Memory", "Both (a) and (b)", "All of these"], correct: "Both (a) and (b)", exam: "UPSSSC JE-2016" }, { id: 17, text: "Which of the following memories has the shortest access time?", options: ["Cache Memory", "Magnetic Bubble Memory", "Magnetic Core Memory", "Random Access Memory"], correct: "Cache Memory", exam: "UPSSSC JE-2015" }, { id: 18, text: "Technology used to provide internet by transmitting data over wires of telephone network is?", options: ["Transmitter", "Diodes", "Uniform Resource Locator", "Digital Subscriber Line"], correct: "Digital Subscriber Line", exam: "UPSSSC Revenue Ins. 2016" }, { id: 19, text: "ISDN is a telecommunication technology where", options: ["Voice, video and data all are transmitted simultaneously", "Only sound is transmitted", "Only video is transmitted", "Only data is transmitted"], correct: "Voice, video and data all are transmitted simultaneously", exam: "UPSSSC Sugarcane Sup.-2016" }, { id: 20, text: "The device that converts a physical image into a digital one is called:", options: ["Scanner", "Image Converter", "Printer", "Recorder"], correct: "Scanner", exam: "UPPCL Stenographer Exam-18.02.2018" }, { id: 21, text: "Which of the following is an input device?", options: ["Mouse", "Keyboard", "Scanner", "All of these"], correct: "All of these", exam: "UPPCL TG-2 26.06.2016" }, { id: 22, text: "Which among the following input devices consists of a stick which pivots on a base and reports its angle or direction of the CPU?", options: ["Microphone", "Light pen", "Keyboard", "Joystick"], correct: "Joystick", exam: "UPPCL JE 2019 (Batch)" } ]; // answer storage: { userAnswer: string, showHint: boolean } let userAnswers = {}; // initialize storage function initStorage() { for (let q of questionsData) { if (!userAnswers[q.id]) { userAnswers[q.id] = { userAnswer: null, showHint: false }; } } } initStorage(); // helper: compute score & attempted function computeStats() { let attempted = 0; let correctCount = 0; for (let q of questionsData) { const answerObj = userAnswers[q.id]; if (answerObj.userAnswer && answerObj.userAnswer.trim() !== "") { attempted++; if (answerObj.userAnswer === q.correct) { correctCount++; } } } return { attempted, correctCount }; } // update header stats UI function updateStatsUI() { const { attempted, correctCount } = computeStats(); document.getElementById('progressCount').innerHTML = `📋 Attempted: ${attempted} / 22`; document.getElementById('scoreDisplay').innerHTML = `⭐ Score: ${correctCount}`; } // toggle show answer hint for a specific question function toggleShowAnswer(qid) { userAnswers[qid].showHint = !userAnswers[qid].showHint; renderQuestions(); // re-render whole list to reflect hint visibility } // handle answer selection function selectAnswer(qid, selectedValue) { userAnswers[qid].userAnswer = selectedValue; // auto hide hint when new answer selected? fine keep state. renderQuestions(); // refresh UI and update stats } // reset entire quiz function resetQuiz() { for (let q of questionsData) { userAnswers[q.id] = { userAnswer: null, showHint: false }; } renderQuestions(); } // dynamic rendering of all question cards function renderQuestions() { const container = document.getElementById('questionsContainer'); if (!container) return; let html = ''; for (let q of questionsData) { const answerObj = userAnswers[q.id]; const selectedVal = answerObj.userAnswer || ""; const showHint = answerObj.showHint; // determine feedback text let feedbackText = ""; let 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"; } // build options with radio let optionsHtml = ''; q.options.forEach(opt => { const checkedAttr = (selectedVal === opt) ? 'checked' : ''; // generate unique ID for accessibility const radioId = `q${q.id}_opt_${opt.replace(/\s/g, '')}`; optionsHtml += `