{"id":112827,"date":"2025-10-19T04:20:37","date_gmt":"2025-10-18T22:50:37","guid":{"rendered":"https:\/\/www.mygreatlearning.com\/blog\/?page_id=112827"},"modified":"2025-10-19T04:08:55","modified_gmt":"2025-10-18T22:38:55","slug":"cpp-quiz","status":"publish","type":"page","link":"https:\/\/www.mygreatlearning.com\/blog\/cpp-quiz\/","title":{"rendered":"C++ Quiz"},"content":{"rendered":"\n<div id=\"cpp-quiz-app-wrapper\">\n    <style>\n        \/* --- General Reset & Variables --- *\/\n        html { scroll-behavior: smooth; }\n        #cpp-quiz-app-wrapper {\n            --primary-blue: #1A73E8; --hover-blue: #1865c9; --background-grey: #F8F9FA; --border-grey: #DADCE0; --text-primary: #202124; --text-secondary: #5F6368; --option-bg: #FFFFFF; --option-hover-bg: #F1F3F4; --color-success: #1E8E3E; --correct-bg: #E6F4EA; --correct-text: #117233; --color-danger: #D93025; --incorrect-bg: #FCE8E6; --incorrect-text: #A50E0E; --color-warning: #f59e0b; --whatsapp-green: #25D366; --twitter-blue: #1DA1F2; --linkedin-blue: #0A66C2; --telegram-blue: #24A1DE; --shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 2px 6px 2px rgba(60, 64, 67, 0.15); --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1); font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif; color: var(--text-primary); box-sizing: border-box;\n        }\n        #cpp-quiz-app-wrapper *, #cpp-quiz-app-wrapper *::before, #cpp-quiz-app-wrapper *::after { box-sizing: inherit; }\n        #quiz-app-container { width: 1200px; max-width: 100%; border-radius: 8px; overflow: hidden; margin: 50px auto auto auto; }\n        #cpp-quiz-app-wrapper .quiz-screen { display: none; }\n        #cpp-quiz-app-wrapper .quiz-screen.active { display: block; animation: fadeIn 0.5s ease-out; }\n        @keyframes fadeIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }\n        \n        \/* --- Screen Padding & Header --- *\/\n        #main-menu-view, #user-details-view, #analysis-view { padding: 2rem 3rem; }\n        #cpp-quiz-app-wrapper .quiz-header { text-align: center; margin-bottom: 2.5rem; }\n        #cpp-quiz-app-wrapper .quiz-header h1 { font-size: 2.5rem; margin: 0 0 0.5rem 0; }\n        #cpp-quiz-app-wrapper .quiz-header p { font-size: 1.1rem; color: var(--text-secondary); max-width: 600px; margin: 0 auto; }\n        \n        \/* --- Main Menu --- *\/\n        #cpp-quiz-app-wrapper .difficulty-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; margin-bottom: 3rem; }\n        #cpp-quiz-app-wrapper .difficulty-card { border: 1px solid var(--border-grey); background-color: #fff; border-radius: 8px; text-align: center; padding: 1.5rem; cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease; display: flex; flex-direction: column; }\n        #cpp-quiz-app-wrapper .difficulty-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }\n        #cpp-quiz-app-wrapper .difficulty-card .icon { font-size: 2.5rem; margin-bottom: 1rem; }\n        #cpp-quiz-app-wrapper .difficulty-card h2 { font-size: 1.5rem; margin: 0 0 0.5rem 0; }\n        #cpp-quiz-app-wrapper .difficulty-card p { font-size: 0.9rem; color: var(--text-secondary); margin: 0 0 1.5rem 0; }\n        #cpp-quiz-app-wrapper .difficulty-card .features { font-size: 0.875rem; color: var(--text-secondary); text-align: left; margin-bottom: 1.5rem; flex-grow: 1; }\n        #cpp-quiz-app-wrapper .difficulty-card .features p { margin: 0.5rem 0; }\n        #cpp-quiz-app-wrapper .start-btn { width: 100%; }\n        #cpp-quiz-app-wrapper .difficulty-card.beginner h2 { color: var(--color-success); }\n        #cpp-quiz-app-wrapper .difficulty-card.intermediate h2 { color: var(--color-warning); }\n        #cpp-quiz-app-wrapper .difficulty-card.advanced h2 { color: var(--color-danger); }\n        #cpp-quiz-app-wrapper .quiz-features-section { text-align: center; background-color: #fff; padding: 2rem; border-radius: 8px; border: 1px solid var(--border-grey); }\n        #cpp-quiz-app-wrapper .quiz-features-section h2 { font-size: 1.5rem; margin: 0 0 1.5rem 0; }\n        #cpp-quiz-app-wrapper .features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; }\n        #cpp-quiz-app-wrapper .feature-item { display: flex; flex-direction: column; align-items: center; }\n        #cpp-quiz-app-wrapper .feature-item .icon { font-size: 2rem; margin-bottom: 0.5rem; }\n        \n        \/* --- Buttons --- *\/\n        #cpp-quiz-app-wrapper .quiz-btn { font-size: 0.875rem; font-weight: 500; padding: 0.6rem 1.5rem; border-radius: 4px; border: 1px solid var(--border-grey); cursor: pointer; transition: background-color 0.2s ease; margin-top: 20px;}\n        #cpp-quiz-app-wrapper .quiz-btn.primary { background-color: var(--primary-blue); color: white; border-color: var(--primary-blue); }\n        #cpp-quiz-app-wrapper .quiz-btn.primary:hover { background-color: var(--hover-blue); }\n        #cpp-quiz-app-wrapper .quiz-btn:disabled { opacity: 0.5; cursor: not-allowed; }\n        \n        \/* --- Quiz Header & Progress --- *\/\n        #quiz-view { background-color: #fff; }\n        #quiz-header, #results-header, #analysis-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.5rem; border-bottom: 1px solid var(--border-grey); }\n        #quiz-header h1, #results-header h1, #analysis-header h1 { font-size: 1.25rem; margin: 0; }\n        #cpp-quiz-app-wrapper .header-actions { display: flex; align-items: center; gap: 1rem; }\n        #progress-stepper { display: flex; gap: 0.5rem; flex-grow: 1; margin: 0 2rem; }\n        #cpp-quiz-app-wrapper .step { height: 4px; flex-grow: 1; background-color: #E0E0E0; border-radius: 2px; transition: background-color 0.3s ease; }\n        #cpp-quiz-app-wrapper .step.active { background-color: var(--primary-blue); }\n        #cpp-quiz-app-wrapper .step.correct { background-color: var(--color-success); }\n        #cpp-quiz-app-wrapper .step.incorrect { background-color: var(--color-danger); }\n        #question-count, #timer { font-size: 0.875rem; color: var(--text-secondary); font-weight: 500; }\n        #timer { min-width: 50px; text-align: right; }\n        \n        \/* --- Quiz Body & Options --- *\/\n        #quiz-body, #analysis-body { padding: 2rem 3rem; }\n        .cpp-quiz-question-text { font-size: 1.25rem; margin: 0 0 2rem 0; line-height: 1.5; }\n        #options-container { display: flex; flex-direction: column; gap: 1rem; }\n        #cpp-quiz-app-wrapper .option { border: 1px solid var(--border-grey); border-radius: 8px; cursor: pointer; transition: all 0.2s ease-in-out; }\n        #cpp-quiz-app-wrapper .option:not(.disabled):hover { border-color: var(--primary-blue); box-shadow: 0 0 0 1px var(--primary-blue); }\n        #cpp-quiz-app-wrapper .option-label { display: block; padding: 1rem; cursor: pointer; }\n        #cpp-quiz-app-wrapper .option-letter { font-weight: 500; margin-right: 1rem; color: var(--primary-blue); }\n        #cpp-quiz-app-wrapper .option.disabled { cursor: not-allowed; }\n        #cpp-quiz-app-wrapper .option.correct { border-color: var(--color-success); background-color: var(--correct-bg); }\n        #cpp-quiz-app-wrapper .option.incorrect { border-color: var(--color-danger); background-color: var(--incorrect-bg); }\n        \n        \/* --- Feedback & Hint --- *\/\n        #cpp-quiz-app-wrapper .feedback { padding: 0 1rem 1rem 1rem; font-size: 0.9rem; line-height: 1.5; }\n        #cpp-quiz-app-wrapper .feedback-title { font-weight: bold; }\n        #cpp-quiz-app-wrapper .feedback-title.correct { color: var(--correct-text); }\n        #cpp-quiz-app-wrapper .feedback-title.incorrect { color: var(--incorrect-text); }\n        #cpp-quiz-app-wrapper .feedback-text { color: var(--text-secondary); margin-top: 0.25rem; }\n        #hint-container { margin-top: 2rem; }\n        #hint-toggle { color: var(--primary-blue); background: none; border: none; padding: 0; font-weight: 500; cursor: pointer; display: flex; align-items: center; gap: 0.25rem; }\n        #hint-toggle svg { width: 20px; height: 20px; transition: transform 0.2s; }\n        #hint-toggle.open svg { transform: rotate(180deg); }\n        #hint-text { margin-top: 0.5rem; color: var(--text-secondary); padding: 1rem; background-color: var(--option-hover-bg); border-radius: 8px; font-size: 0.9rem; }\n        \n        \/* --- Quiz Footer --- *\/\n        #quiz-footer, #analysis-footer { display: flex; justify-content: space-between; padding: 1.5rem 3rem; gap: 1rem; border-top: 1px solid var(--border-grey); }\n        #analysis-footer { justify-content: flex-end; }\n        \n        \/* --- User Details & Analysis --- *\/\n        #user-details-form-container { max-width: 500px; margin: 2rem auto; }\n        #user-details-form .form-group { margin-bottom: 1rem; }\n        #user-details-form label { display: block; font-weight: 500; margin-bottom: 0.5rem; text-align: left;}\n        #user-details-form input { width: 100%; padding: 0.75rem; border: 1px solid var(--border-grey); border-radius: 4px; font-size: 1rem; }\n        #user-details-form input:focus { outline: none; border-color: var(--primary-blue); box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2); }\n        #user-details-form small { display: block; margin-top: 0.5rem; color: var(--text-secondary); font-size: 0.8rem; text-align: left;}\n        #cpp-quiz-app-wrapper .form-actions { display: flex; gap: 1rem; margin-top: 1.5rem; }\n        #cpp-quiz-app-wrapper .form-actions .quiz-btn { flex: 1; }\n        #cpp-quiz-app-wrapper .category-analysis { margin-bottom: 2rem; }\n        #cpp-quiz-app-wrapper .category-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }\n        #cpp-quiz-app-wrapper .category-header h3 { margin: 0; font-size: 1rem; }\n        #cpp-quiz-app-wrapper .category-score { font-weight: 500; }\n        #cpp-quiz-app-wrapper .progress-bar-bg { width: 100%; height: 8px; background: #eee; border-radius: 4px; overflow: hidden; }\n        #cpp-quiz-app-wrapper .progress-bar-fg { height: 100%; background: var(--primary-blue); border-radius: 4px; transition: width 0.5s ease-out; }\n        #cpp-quiz-app-wrapper .question-breakdown { font-size: 0.875rem; margin-top: 1rem; text-align: left; }\n        #cpp-quiz-app-wrapper .question-breakdown strong { color: var(--correct-text); }\n        #cpp-quiz-app-wrapper .question-breakdown span { color: var(--incorrect-text); }\n        #cpp-quiz-app-wrapper .hidden { display: none; }\n\n        \/* --- START: New Results View Styles --- *\/\n        #results-view .container { max-width: 1100px; margin: 0 auto; padding: 2rem 1rem; color: #1A202C;}\n        #results-view .page-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 2rem; flex-wrap: wrap; }\n        #results-view .header-title h1 { font-size: 2rem; font-weight: 700; margin: 0; }\n        #results-view .header-title p { color: #4A5568; margin-top: 0.25rem; }\n        #results-view .restart-quiz-btn { display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 1.2rem; background-color: #4353FF; border: 1px solid #E2E8F0; border-radius: 0.5rem; font-size: 0.875rem; font-weight: 600; color: white; cursor: pointer; transition: background-color 0.2s; margin-top: 1rem; }\n        #results-view .restart-quiz-btn:hover { background-color: #4353FF; }\n        #results-view .main-content { display: grid; grid-template-columns: 1fr; gap: 2rem; }\n        #results-view .card { background-color: #ffffff; padding: 1.5rem; }\n        #results-view .score-card { text-align: center; color:gray;}\n        #results-view .score-card h2 { font-size: 1.125rem; font-weight: 600; margin-top: 0; margin-bottom: 1rem; }\n        #results-view .score-visual { position: relative; width: 10rem; height: 10rem; margin: 0 auto; }\n        #results-view .score-visual svg { width: 100%; height: 100%; }\n        #results-view .progress-ring-circle { transition: stroke-dashoffset 0.8s ease-out; transform: rotate(-90deg); transform-origin: 50% 50%; }\n        #results-view .score-text { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; }\n        #results-view .score-text .score-value { font-size: 2.25rem; font-weight: 700; }\n        #results-view .score-text .score-value span { font-size: 1.5rem; color: #4A5568; }\n        #results-view .score-text .score-label { font-size: 0.875rem; color: #4A5568; margin-top: 0.25rem; }\n        #results-view .score-breakdown { margin-top: 1.5rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }\n        #results-view .score-breakdown div span { font-weight: 700; font-size: 1.125rem; }\n        #results-view .score-breakdown div p { font-size: 0.75rem; color: #4A5568; margin: 0; }\n        #results-view .text-correct { color: #22c55e; }\n        #results-view .text-incorrect { color: #ef4444; }\n        #results-view .text-skipped { color: #6b7280; }\n        #results-view .analysis-card { display: flex; align-items: flex-start; gap: 1rem; justify-content: center; color:gray; }\n        #results-view .analysis-icon { flex-shrink: 0; width: 2.5rem; height: 2.5rem; background-color: #F0F1FF; border-radius: 0.5rem; display: flex; align-items: center; justify-content: center; }\n        #results-view .analysis-content h3 { font-weight: 600; margin: 0; font-size: 1.2rem; }\n        #results-view .analysis-content p { font-size: 0.875rem; color: #4A5568; margin: 0.25rem 0 1rem 0; }\n        #results-view .primary-button { width: 100%; padding: 0.6rem 1.2rem; background-color: #4353FF; border-radius: 0.5rem; font-size: 0.875rem; font-weight: 600; color: #ffffff; border: none; cursor: pointer; transition: background-color 0.2s; }\n        #results-view .primary-button:hover { background-color: #2539cc; }\n        #results-view .learning-journey-card h2 { font-size: 1.5rem; font-weight: 700; margin-top: 0; }\n        #results-view .learning-journey-card > p { color: #4A5568; margin: 0.25rem 0 2rem 0; }\n        #results-view .course-list { display: flex; flex-direction: column; gap: 1rem; }\n        #results-view .course-card { padding: 1.25rem; border: 1px solid #E2E8F0; border-radius: 0.75rem; transition: box-shadow 0.2s, border-color 0.2s; }\n        #results-view .course-card:hover { border-color: #4353FF; box-shadow: 0 4px 6px -1px rgb(0 0 0 \/ 0.1), 0 2px 4px -2px rgb(0 0 0 \/ 0.1); }\n        #results-view .course-card-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 3px; }\n        #results-view .course-details h3 { font-weight: 700; margin: 0; font-size: 1rem; }\n        #results-view .course-details p { font-size: 0.875rem; color: #4A5568; margin-top: 0.25rem; max-width: 36rem; }\n        #results-view .course-button { margin-top: 1rem; flex-shrink: 0; padding: 0.3rem 1rem; border-radius: 0.5rem; font-size: 0.875rem; font-weight: 600; cursor: pointer; border: 1px solid #4353FF; transition: background-color 0.2s; text-decoration: none; display: inline-block; }\n        #results-view .btn-primary { background-color: #4353FF; color: #ffffff; }\n        #results-view .btn-primary:hover { background-color: #2539cc; }\n        #results-view .page-footer { margin-top: 2rem; padding: 2rem; }\n        #results-view .footer-content { display: grid; grid-template-columns: 1fr; gap: 2rem; }\n        #results-view .footer-column h3 { font-size: 1.125rem; font-weight: 700; margin: 0; }\n        #results-view .footer-column p { font-size: 0.875rem; color: #4A5568; margin-top: 0.25rem; margin-bottom: 1rem; }\n        #results-view .resource-links { display: flex; flex-wrap: wrap; gap: 0.5rem; }\n        #results-view .resource-link { padding: 0.5rem 1rem; background-color: #f3f4f6; color: #4A5568; font-size: 0.875rem; font-weight: 500; border-radius: 9999px; text-decoration: none; transition: background-color 0.2s, color 0.2s; }\n        #results-view .resource-link:hover { background-color: #F0F1FF; color: #4353FF; }\n        #results-view .share-icons { display: flex; align-items: center; gap: 0.75rem; }\n        #results-view .share-icon { width: 2.5rem; height: 2.5rem; display: flex; align-items: center; justify-content: center; background-color: #f3f4f6; border-radius: 9999px; color: #4A5568; transition: background-color 0.2s; }\n        #results-view .share-icon:hover { background-color: #e5e7eb; }\n        #results-view .share-icon svg { width: 1.25rem; height: 1.25rem; }\n        \/* --- END: New Results View Styles --- *\/\n\n        \/* --- Media Queries (Responsiveness) --- *\/\n        @media (max-width: 768px) {\n            #main-menu-view, #quiz-body, #results-body, #user-details-view, #analysis-view, #results-view .container { padding: 1.5rem; }\n            #cpp-quiz-app-wrapper .quiz-header h1 { font-size: 2rem; }\n            #cpp-quiz-app-wrapper .difficulty-grid { grid-template-columns: 1fr; }\n            #progress-stepper { display: none; }\n            #quiz-header h1 { font-size: 1rem; }\n            #quiz-footer { flex-direction: column-reverse; gap: 5rem; margin-bottom: -20px; }\n            #quiz-footer>div { display: flex; justify-content: flex-end; width: 100%; gap: 0.5rem; }\n        }\n        @media (min-width: 640px) {\n            #results-view .page-header { flex-wrap: nowrap; }\n            #results-view .restart-quiz-btn { margin-top: 0; }\n            #results-view .course-button { margin-top: 0; width: auto; }\n            #results-view .course-card-content { flex-wrap: nowrap; }\n        }\n        @media (min-width: 768px) {\n            #results-view .footer-content { grid-template-columns: 2fr 1fr; }\n        }\n        @media (min-width: 1024px) {\n            #results-view .main-content { grid-template-columns: 1fr 2fr; }\n        }\n    <\/style>\n    <div id=\"quiz-app-container\">\n        <div id=\"main-menu-view\" class=\"quiz-screen active\">\n            <div class=\"quiz-header\"><h1 id=\"c-quiz-challenge\">C++ Quiz Challenge<\/h1><p>Test your C++ knowledge with our comprehensive MCQs. Choose your difficulty and share your score with friends!<\/p><\/div>\n            <div class=\"difficulty-grid\">\n                <div class=\"difficulty-card beginner\" onclick=\"showUserDetailsView('beginner')\">\n                    <div class=\"icon\">\u2b50<\/div><h2 id=\"beginner\">Beginner<\/h2><p>Perfect for C++ newcomers<\/p>\n                    <div class=\"features\"><p>\u2022 Basic syntax & concepts<\/p><p>\u2022 Variables and I\/O streams<\/p><p>\u2022 Simple operations<\/p><p>\u2022 10 Questions<\/p><\/div>\n                    <button class=\"quiz-btn primary start-btn\">Start Beginner Quiz<\/button>\n                <\/div>\n                <div class=\"difficulty-card intermediate\" onclick=\"showUserDetailsView('intermediate')\">\n                    <div class=\"icon\">\ud83c\udfc6<\/div><h2 id=\"intermediate\">Intermediate<\/h2><p>For those with some experience<\/p>\n                    <div class=\"features\"><p>\u2022 Pointers & References<\/p><p>\u2022 Classes and OOP<\/p><p>\u2022 Memory Management<\/p><p>\u2022 15 Questions<\/p><\/div>\n                    <button class=\"quiz-btn primary start-btn\">Start Intermediate Quiz<\/button>\n                <\/div>\n                <div class=\"difficulty-card advanced\" onclick=\"showUserDetailsView('advanced')\">\n                    <div class=\"icon\">\ud83e\udd47<\/div><h2 id=\"advanced\">Advanced<\/h2><p>A challenge for C++ experts<\/p>\n                    <div class=\"features\"><p>\u2022 Templates & RAII<\/p><p>\u2022 Smart Pointers & C++11<\/p><p>\u2022 Advanced OOP concepts<\/p><p>\u2022 15 Questions<\/p><\/div>\n                    <button class=\"quiz-btn primary start-btn\">Start Advanced Quiz<\/button>\n                <\/div>\n            <\/div>\n            <div class=\"quiz-features-section\">\n                <h2 id=\"quiz-features\">Quiz Features<\/h2>\n                <div class=\"features-grid\">\n                    <div class=\"feature-item\"><div class=\"icon\">\ud83e\udde0<\/div><p>Detailed Feedback<\/p><\/div>\n                    <div class=\"feature-item\"><div class=\"icon\">\ud83d\udcca<\/div><p>Performance Analysis<\/p><\/div>\n                    <div class=\"feature-item\"><div class=\"icon\">\ud83d\udca1<\/div><p>Helpful Hints<\/p><\/div>\n                <\/div>\n            <\/div>\n        <\/div>\n        <div id=\"user-details-view\" class=\"quiz-screen\">\n            <div class=\"quiz-header\">\n                <h1 id=\"almost-there\">Almost There!<\/h1>\n                <p>Just a few details before you start the quiz.<\/p>\n            <\/div>\n            <div id=\"user-details-form-container\">\n               <form id=\"user-details-form\">\n                    <div class=\"form-group\"><label for=\"user-name\">Your Name<\/label><input type=\"text\" id=\"user-name\" name=\"user-name\" required><\/div>\n                    <div class=\"form-group\"><label for=\"user-email\">Your Email<\/label><input type=\"email\" id=\"user-email\" name=\"user-email\" required><\/div>\n                    <small>You will also get free access to exclusive content through email.<\/small>\n                    <div class=\"form-actions\">\n                        <button type=\"button\" id=\"back-to-menu-btn\" class=\"quiz-btn\">Back to Menu<\/button>\n                        <button type=\"submit\" class=\"quiz-btn primary\">Let's Go!<\/button>\n                    <\/div>\n                <\/form>\n            <\/div>\n        <\/div>\n        <div id=\"quiz-view\" class=\"quiz-screen\">\n            <header id=\"quiz-header\">\n                <h1 id=\"c-quiz\">C++ Quiz<\/h1>\n                <div id=\"progress-stepper\"><\/div>\n                <div class=\"header-actions\"><div id=\"timer\">00:00<\/div><div id=\"question-count\">1\/10<\/div><\/div>\n            <\/header>\n            <main id=\"quiz-body\">\n                <h2 class=\"cpp-quiz-question-text\" style=\"font-size: 22px;\" class=\"cpp-quiz-question-text\" style=\"font-size: 22px;\" id=\"question-will-appear-here\">Question will appear here.<\/h2>\n                <div id=\"options-container\"><\/div>\n                <div id=\"hint-container\">\n                    <button id=\"hint-toggle\">Show hint <svg viewBox=\"0 0 24 24\"><path fill=\"currentColor\" d=\"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z\"><\/path><\/svg><\/button>\n                    <div id=\"hint-text\" class=\"hidden\">Hint text goes here.<\/div>\n                <\/div>\n            <\/main>\n            <footer id=\"quiz-footer\">\n                <button class=\"quiz-btn\" onclick=\"showMainMenu(true)\">Back to Menu<\/button>\n                <div><button id=\"back-btn\" class=\"quiz-btn\">Back<\/button><button id=\"next-btn\" class=\"quiz-btn primary\">Next<\/button><\/div>\n            <\/footer>\n        <\/div>\n        \n        <div id=\"results-view\" class=\"quiz-screen\">\n            <div class=\"container\">\n                <header class=\"page-header\">\n                    <div class=\"header-title\">\n                        <h1 id=\"quiz-completed\">Quiz Completed!<\/h1>\n                        <p>Great effort! Here's a summary of your performance.<\/p>\n                    <\/div>\n                    <button class=\"restart-quiz-btn\" onclick=\"showMainMenu(false)\">\n                        <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8\"\/><path d=\"M3 3v5h5\"\/><\/svg>\n                        <span>Restart Quiz \/ Main Menu<\/span>\n                    <\/button>\n                <\/header>\n        \n                <main class=\"main-content\">\n                    <aside class=\"left-column\">\n                        <div class=\"card score-card\">\n                            <h2 id=\"your-score\">Your Score<\/h2>\n                            <div class=\"score-visual\">\n                                 <svg viewBox=\"0 0 100 100\">\n                                    <circle stroke=\"#e5e7eb\" stroke-width=\"10\" fill=\"transparent\" r=\"45\" cx=\"50\" cy=\"50\" \/>\n                                    <circle class=\"progress-ring-circle\" stroke=\"#4353FF\" stroke-width=\"10\" stroke-dasharray=\"282.6\" stroke-dashoffset=\"282.6\" stroke-linecap=\"round\" fill=\"transparent\" r=\"45\" cx=\"50\" cy=\"50\" id=\"score-circle\" \/>\n                                <\/svg>\n                                <div class=\"score-text\">\n                                    <span class=\"score-value\" id=\"new-score-value\">0<span>\/10<\/span><\/span>\n                                    <span class=\"score-label\" id=\"new-accuracy-label\">0% Accuracy<\/span>\n                                <\/div>\n                            <\/div>\n                            <div class=\"score-breakdown\">\n                                <div><span class=\"text-correct\" id=\"new-right-value\">0<\/span><p>Correct<\/p><\/div>\n                                <div><span class=\"text-incorrect\" id=\"new-wrong-value\">0<\/span><p>Incorrect<\/p><\/div>\n                                <div><span class=\"text-skipped\" id=\"new-skipped-value\">10<\/span><p>Skipped<\/p><\/div>\n                            <\/div>\n                        <\/div>\n        \n                        <div class=\"card analysis-card\" style=\"margin-top: 2rem;\">\n                            <div class=\"analysis-icon\">\n                               <svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"#4353FF\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z\"><\/path><\/svg>\n                            <\/div>\n                            <div class=\"analysis-content\">\n                                <h3 id=\"strengths-and-growth-areas\">Strengths and growth areas<\/h3>\n                                <p>Get a summary of your key strengths and discover areas where you can focus your studies.<\/p>\n                                <button class=\"primary-button\" id=\"analyse-btn\">Analyze my performance<\/button>\n                            <\/div>\n                        <\/div>\n                    <\/aside>\n        \n                    <section class=\"right-column\">\n                        <div class=\"card learning-journey-card\">\n                            <h2 id=\"continue-your-learning-journey\">Continue Your Learning Journey<\/h2>\n                            <p>Here are some courses that can help you level up your C++ skills.<\/p>\n                            <div class=\"course-list\">\n                                <div class=\"course-card\">\n                                    <div class=\"course-card-content\">\n                                        <div class=\"course-details\">\n                                            <h3 id=\"free-c-course\">Free C++ Course<\/h3>\n                                            <p>Learn C++ basics including variables, data types, control statements, strings, arrays, functions, pointers, and classes. Suitable for beginners starting with programming.<\/p>\n                                        <\/div>\n                                        <a href=\"https:\/\/www.mygreatlearning.com\/academy\/learn-for-free\/courses\/c-tutorial?utm_source=blog\" target=\"_blank\" rel=\"noopener\" class=\"course-button btn-primary\">Enroll for Free<\/a>\n                                    <\/div>\n                                <\/div>\n                                <div class=\"course-card\">\n                                    <div class=\"course-card-content\">\n                                        <div class=\"course-details\">\n                                            <h3 id=\"c-programming-course-beginner-to-advanced\">C++ Programming Course (Beginner to Advanced)<\/h3>\n                                            <p>Covers C++ concepts like variables, loops, functions, OOP, inheritance, and polymorphism. Includes two projects, Grade Management and Banking System for practical learning.<\/p>\n                                        <\/div>\n                                        <a href=\"https:\/\/www.mygreatlearning.com\/academy\/premium\/learn-c-programming-for-beginners-to-advanced?utm_source=blog\" target=\"_blank\" rel=\"noopener\" class=\"course-button btn-primary\">Enroll Now<\/a>\n                                    <\/div>\n                                <\/div>\n                                 <div class=\"course-card\">\n                                    <div class=\"course-card-content\">\n                                        <div class=\"course-details\">\n                                            <h3 id=\"data-structures-and-algorithms-with-c\">Data Structures and Algorithms with C++<\/h3>\n                                            <p>Learn arrays, linked lists, stacks, queues, trees, heaps, graphs, sorting, and searching. Includes projects on Job Scheduling and Restaurant Order Management systems.<\/p>\n                                        <\/div>\n                                        <a href=\"https:\/\/www.mygreatlearning.com\/academy\/premium\/data-structures-and-algorithms-with-c?utm_source=blog\" target=\"_blank\" rel=\"noopener\" class=\"course-button btn-primary\">Enroll Now<\/a>\n                                    <\/div>\n                                <\/div>\n                                <\/div>\n                        <\/div>\n                    <\/section>\n                <\/main>\n                \n                <footer class=\"card page-footer\">\n                    <div class=\"footer-content\">\n                        <div class=\"footer-column\">\n                            <h3 id=\"explore-more-resources\">Explore More Resources<\/h3>\n                            <p class=\"text-sm text-brand-text-secondary mt-1 mb-4\">Dive deeper into topics that interest you.<\/p>\n                            <div class=\"resource-links\">\n                                <a href=\"https:\/\/www.mygreatlearning.com\/blog\/quizzes\/\" class=\"resource-link\">Quizzes and MCQs<\/a>\n                                <a href=\"https:\/\/www.mygreatlearning.com\/blog\/tools-and-compilers\/\" class=\"resource-link\">Online Compilers<\/a>\n                                <a href=\"https:\/\/www.mygreatlearning.com\/blog\/exercises\/\" class=\"resource-link\">Coding Practice<\/a>\n                                <a href=\"https:\/\/www.mygreatlearning.com\/blog\/interview-questions\/\" class=\"resource-link\">Interview Questions<\/a>\n                                <a href=\"https:\/\/www.mygreatlearning.com\/blog\/careers-and-roadmap\/\" class=\"resource-link\">Careers and Roadmaps<\/a>\n                                <a href=\"https:\/\/www.mygreatlearning.com\/blog\/project-ideas\/\" class=\"resource-link\">Project Ideas<\/a>\n                            <\/div>\n                        <\/div>\n        \n                        <div class=\"footer-column\">\n                             <h3 id=\"share-your-achievement\">Share Your Achievement<\/h3>\n                             <p>Let your network know about your progress.<\/p>\n                             <div class=\"share-icons\">\n                                 <a href=\"#\" id=\"new-share-whatsapp\" class=\"share-icon\" aria-label=\"WhatsApp\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 24 24\" width=\"128\" height=\"128\" aria-labelledby=\"whTitle\" role=\"img\">\n                                    <title id=\"whTitle\">WhatsApp-style icon (custom color #4a5568)<\/title>\n                                    <defs>\n                                        <filter id=\"shadow\" x=\"-50%\" y=\"-50%\" width=\"200%\" height=\"200%\"><feDropShadow dx=\"0\" dy=\"1.5\" stdDeviation=\"1.2\" flood-color=\"#000\" flood-opacity=\"0.18\"\/><\/filter>\n                                        <linearGradient id=\"baseGrad\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\"><stop offset=\"0%\" stop-color=\"#6b7280\"\/><stop offset=\"100%\" stop-color=\"#4a5568\"\/><\/linearGradient>\n                                    <\/defs>\n                                    <path d=\"M12 2C6.486 2 2 6.486 2 12c0 1.653.403 3.213 1.107 4.595L2 22l5.467-1.446A9.963 9.963 0 0 0 12 22c5.514 0 10-4.486 10-10S17.514 2 12 2z\" fill=\"#000\" opacity=\"0\" filter=\"url(#shadow)\"\/>\n                                    <path d=\"M12 2C6.486 2 2 6.486 2 12c0 1.653.403 3.213 1.107 4.595L2 22l5.467-1.446A9.963 9.963 0 0 0 12 22c5.514 0 10-4.486 10-10S17.514 2 12 2z\" fill=\"url(#baseGrad)\" stroke=\"#ffffff\" stroke-width=\"0.9\" stroke-linejoin=\"round\"\/>\n                                    <path d=\"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.472-.149-.672.15-.199.297-.768.967-.941 1.165-.173.199-.347.223-.644.074-.297-.149-1.255-.462-2.39-1.475-.884-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.297-.347.446-.52.151-.173.201-.298.301-.497.1-.199.05-.373-.025-.522-.075-.148-.672-1.612-.922-2.206-.242-.579-.487-.5-.672-.51l-.576-.01c-.199 0-.523.074-.798.373-.273.297-1.04 1.017-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.095 3.2 5.076 4.487 2.981 1.289 2.981.86 3.517.807.536-.05 1.758-.718 2.006-1.41.248-.692.248-1.285.173-1.41-.074-.124-.273-.198-.57-.347z\" fill=\"#ffffff\"\/>\n                                <\/svg><\/a>\n                                <a href=\"#\" id=\"new-share-linkedin\" class=\"share-icon\" aria-label=\"LinkedIn\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M19,3A2,2 0 0,1 21,5V19A2,2 0 0,1 19,21H5A2,2 0 0,1 3,19V5A2,2 0 0,1 5,3H19M18.5,18.5V13.2A3.26,3.26 0 0,0 15.24,9.94C14.39,9.94 13.4,10.43 12.92,11.24V10.13H10.13V18.5H12.92V13.57C12.92,12.8 13.54,12.17 14.31,12.17A1.4,1.4 0 0,1 15.71,13.57V18.5H18.5M6.88,8.56A1.68,1.68 0 0,0 8.56,6.88C8.56,6 7.81,5.25 6.88,5.25A1.69,1.69 0 0,0 5.2,6.88C5.2,7.81 5.95,8.56 6.88,8.56M8.27,18.5V10.13H5.5V18.5H8.27Z\" \/><\/svg><\/a>\n                                <a href=\"#\" id=\"new-share-telegram\" class=\"share-icon\" aria-label=\"Telegram\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M2.01 21L23 12L2.01 3L2 10L17 12L2 14L2.01 21Z\" \/><\/svg><\/a>\n                                <a href=\"#\" id=\"new-share-twitter\" class=\"share-icon\" aria-label=\"Twitter\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M22.46,6C21.69,6.35 20.86,6.58 20,6.69C20.88,6.16 21.56,5.32 21.88,4.31C21.05,4.81 20.13,5.16 19.16,5.36C18.37,4.5 17.26,4 16,4C13.65,4 11.73,5.92 11.73,8.29C11.73,8.63 11.77,8.96 11.84,9.27C8.28,9.09 5.11,7.38 2.9,4.79C2.53,5.42 2.33,6.15 2.33,6.94C2.33,8.43 3.11,9.75 4.19,10.55C3.47,10.53 2.8,10.33 2.2,10.03C2.2,10.05 2.2,10.07 2.2,10.08C2.2,12.24 3.73,14.04 5.7,14.44C5.31,14.55 4.91,14.61 4.5,14.61C4.22,14.61 3.95,14.58 3.69,14.53C4.24,16.33 5.95,17.55 7.95,17.59C6.46,18.8 4.57,19.56 2.5,19.56C2.17,19.56 1.85,19.54 1.53,19.5C3.55,20.84 5.9,21.6 8.41,21.6C16,21.6 20.34,15.22 20.34,9.73C20.34,9.56 20.33,9.4 20.32,9.23C21.16,8.63 21.88,7.87 22.46,7.01C21.74,7.33 20.97,7.55 20.18,7.65C20.99,7.16 21.64,6.38 21.96,5.43L22.46,6Z\" \/><\/svg><\/a>\n                             <\/div>\n                        <\/div>\n                    <\/div>\n                <\/footer>\n            <\/div>\n        <\/div>\n\n        <div id=\"analysis-view\" class=\"quiz-screen\">\n            <header id=\"analysis-header\"><h1 id=\"performance-analysis\">Performance Analysis<\/h1><\/header>\n            <main id=\"analysis-body\"><\/main>\n            <footer id=\"analysis-footer\">\n                <button id=\"back-to-results-btn\" class=\"quiz-btn primary\">Back to Results<\/button>\n            <\/footer>\n        <\/div>\n    <\/div>\n    <script>\n    document.addEventListener('DOMContentLoaded', function() {\n        \/\/ --- DATA (with HTML encoding) ---\n        const quizData = {\n            beginner: [\n                { category: \"Syntax\", question: \"How do you write a single-line comment in C++?\", options: { A: \"# This is a comment\", B: \"\/* This is a comment *\/\", C: \"\/\/ This is a comment\", D: \"-- This is a comment\" }, answer: \"C\", hint: \"C++ inherited its comment style from the C language, but also added a new, shorter way for single lines.\", feedback: { C: \"Correct! `\/\/` is used for single-line comments in C++.\", A: \"The `#` symbol is used for preprocessor directives, not comments.\", B: \"This syntax is used for multi-line comments in C++.\" } },\n                { category: \"Fundamentals\", question: \"What is the correct way to declare an integer variable named 'score' with a value of 100?\", options: { A: \"score = 100;\", B: \"int score = 100;\", C: \"variable score = 100;\", D: \"integer score = 100;\" }, answer: \"B\", hint: \"C++ is a statically-typed language, meaning you must specify the data type when declaring a variable.\", feedback: { B: \"Correct! You must declare the type (`int`) followed by the variable name and its initial value.\", A: \"This would be an assignment, but the variable 'score' has not been declared with a type first.\", C: \"C++ does not use a generic 'variable' keyword.\" } },\n                { category: \"I\/O\", question: \"Which header file must be included to use `std::cout` and `std::cin`?\", options: { A: \"&lt;string&gt;\", B: \"&lt;stdio.h&gt;\", C: \"&lt;iostream&gt;\", D: \"&lt;system&gt;\" }, answer: \"C\", hint: \"The name of the header stands for Input\/Output Stream.\", feedback: { C: \"Correct! The `&lt;iostream&gt;` header contains the declarations for standard input and output stream objects.\", B: \"`&lt;stdio.h&gt;` is the C-style header for standard I\/O.\" } },\n                { category: \"Functions\", question: \"What is the name of the function where a C++ program begins its execution?\", options: { A: \"start()\", B: \"main()\", C: \"begin()\", D: \"program()\" }, answer: \"B\", hint: \"This is the primary and essential function for any executable C++ program.\", feedback: { B: \"Correct! The `main()` function is the designated entry point for every C++ program.\" } },\n                { category: \"Operators\", question: \"What is the output of `std::cout << 5 + 3 * 2;`?\", options: { A: \"16\", B: \"11\", C: \"10\", D: \"Error\" }, answer: \"B\", hint: \"Remember the standard order of operations (PEMDAS\/BODMAS). Multiplication has higher precedence than addition.\", feedback: { B: \"Correct! Due to operator precedence, multiplication (3 * 2) is done first, resulting in 6. Then addition (5 + 6) gives 11.\" } },\n                { category: \"Data Structures\", question: \"Which is the standard C++ library component for a dynamic array?\", options: { A: \"Array()\", B: \"list&lt;&gt;\", C: \"int[]\", D: \"std::vector&lt;&gt;\" }, answer: \"D\", hint: \"This container is part of the Standard Template Library (STL) and can grow or shrink in size.\", feedback: { D: \"Correct! `std::vector` is the C++ standard library's sequence container representing a dynamic array.\", C: \"`int[]` is a C-style fixed-size array.\" } },\n                { category: \"Control Flow\", question: \"How do you correctly start a `for` loop that runs 10 times?\", options: { A: \"for (int i = 0; i &lt; 10; i++)\", B: \"for i in 1..10\", C: \"for (i &lt; 10)\", D: \"loop (i = 0; i &lt; 10; i++)\" }, answer: \"A\", hint: \"The C++ `for` loop has three parts inside its parentheses: initialization, condition, and increment\/decrement.\", feedback: { A: \"Correct! This is the classic C-style `for` loop syntax used in C++.\", B: \"This syntax is reminiscent of languages like Ruby or Kotlin.\" } },\n                { category: \"Strings\", question: \"Which operator is used to concatenate `std::string` objects?\", options: { A: \"&\", B: \".\", C: \"+\", D: \"&&\" }, answer: \"C\", hint: \"It's the same operator used for mathematical addition.\", feedback: { C: \"Correct! The `+` operator is overloaded for `std::string` to perform concatenation.\" } },\n                { category: \"Fundamentals\", question: \"What punctuation mark is used to end most statements in C++?\", options: { A: \"Colon (:)\", B: \"Period (.)\", C: \"Comma (,)\", D: \"Semicolon (;)\" }, answer: \"D\", hint: \"Forgetting this is one of the most common syntax errors for beginners.\", feedback: { D: \"Correct! A semicolon `;` is used to terminate statements, telling the compiler that you've finished a command.\" } },\n                { category: \"Operators\", question: \"Which operator is used to check for equality between two values?\", options: { A: \"=\", B: \"==\", C: \"===\", D: \".equals()\" }, answer: \"B\", hint: \"A single equals sign is used for assignment, not comparison.\", feedback: { B: \"Correct! The double equals `==` is the equality operator, which compares two values and returns a boolean.\", A: \"A single `=` is the assignment operator.\" } }\n            ],\n            intermediate: [\n                { category: \"Pointers & References\", question: \"What is a key difference between a pointer and a reference?\", options: { A: \"A pointer holds a value, while a reference holds a memory address.\", B: \"A reference must be initialized and cannot be made to refer to another object.\", C: \"A pointer is declared with `&` and a reference with `*`.\", D: \"There is no difference; they are interchangeable.\" }, answer: \"B\", hint: \"Think about which one can be null or be 'reseated' after it's created.\", feedback: { B: \"Correct! A reference is an alias for an existing object and cannot be null or changed to refer to something else, whereas a pointer can be null and its target address can be changed.\" } },\n                { category: \"OOP\", question: \"What is a constructor?\", options: { A: \"A function that destroys an object.\", B: \"A member function with the same name as the class, used for initialization.\", C: \"A function that copies an object.\", D: \"A global function for building classes.\" }, answer: \"B\", hint: \"This special function is automatically called when a new object of a class is created.\", feedback: { B: \"Correct! A constructor is a special member function that initializes a newly created object.\" } },\n                { category: \"OOP\", question: \"In a C++ class, what is the default access specifier for members?\", options: { A: \"public\", B: \"protected\", C: \"private\", D: \"global\" }, answer: \"C\", hint: \"C++ prioritizes encapsulation. For a `struct`, the default is different.\", feedback: { C: \"Correct! If you don't specify an access level, all members of a `class` are `private` by default.\", A: \"`public` is the default for a `struct`.\" } },\n                { category: \"Memory Management\", question: \"Which keyword is used to deallocate memory that was allocated with `new`?\", options: { A: \"remove\", B: \"free\", C: \"delete\", D: \"dealloc\" }, answer: \"C\", hint: \"`new` and `delete` are a pair. `malloc` and `free` are their C-style counterparts.\", feedback: { C: \"Correct! `delete` must be used to release memory allocated with `new` to prevent memory leaks. For arrays allocated with `new[]`, you must use `delete[]`.\" } },\n                { category: \"Functions\", question: \"What is function overloading?\", options: { A: \"Creating a function that takes too many arguments.\", B: \"Defining multiple functions with the same name but different parameter lists.\", C: \"A function that calls itself.\", D: \"Overriding a function in a derived class.\" }, answer: \"B\", hint: \"This allows you to create multiple versions of a function that perform similar tasks on different types or numbers of inputs.\", feedback: { B: \"Correct! Function overloading allows multiple functions to have the same name as long as their signatures (number or type of parameters) are different.\" } },\n                { category: \"OOP\", question: \"What does the `const` keyword at the end of a member function declaration signify? (e.g., `void print() const;`)\", options: { A: \"The function returns a constant value.\", B: \"The function cannot be overridden.\", C: \"The function will not modify the state of the object it is called on.\", D: \"The function can only be called by constant objects.\" }, answer: \"C\", hint: \"This is a promise to the compiler that the function is 'read-only' with respect to the object's member variables.\", feedback: { C: \"Correct! A `const` member function guarantees that it will not change any member variables of the object, allowing it to be called on `const` instances of the class.\" } },\n                { category: \"Headers\", question: \"What is the primary purpose of header guards (`#ifndef`, `#define`, `#endif`)?\", options: { A: \"To secure the header file from being read.\", B: \"To speed up compilation.\", C: \"To prevent the same header file from being included multiple times in one translation unit.\", D: \"To define a global namespace for the header.\" }, answer: \"C\", hint: \"Without them, you could get re-definition errors from the compiler.\", feedback: { C: \"Correct! Header guards are a preprocessor mechanism to avoid problems with multiple inclusions of the same header file, which can lead to compilation errors.\" } },\n                { category: \"OOP\", question: \"What does the `this` pointer hold?\", options: { A: \"The address of the base class.\", B: \"The address of the current object instance.\", C: \"The address of the next object in memory.\", D: \"A null pointer.\" }, answer: \"B\", hint: \"It's an implicit parameter passed to every non-static member function.\", feedback: { B: \"Correct! Inside a member function, the `this` pointer holds the memory address of the object on which the function was called.\" } },\n                { category: \"STL\", question: \"How do you add an element to the end of a `std::vector` named `vec`?\", options: { A: \"vec.add(element);\", B: \"vec.append(element);\", C: \"vec.push_back(element);\", D: \"vec[vec.size()] = element;\" }, answer: \"C\", hint: \"Think of 'pushing' the new element onto the 'back' of the vector.\", feedback: { C: \"Correct! `push_back()` is the member function used to add an element to the end of a `std::vector`, resizing it if necessary.\" } },\n                { category: \"Core Concepts\", question: \"What is the main difference between a `struct` and a `class` in C++?\", options: { A: \"Structs cannot have member functions.\", B: \"Classes support inheritance, but structs do not.\", C: \"Default member access: `public` for struct, `private` for class.\", D: \"Structs are stored on the stack, classes on the heap.\" }, answer: \"C\", hint: \"Functionally, they are almost identical. The key difference is a matter of convention and default visibility.\", feedback: { C: \"Correct! This is the only difference. By default, all members of a `struct` are `public`, while all members of a `class` are `private`.\" } },\n                { category: \"C++11\", question: \"What is the purpose of the `auto` keyword?\", options: { A: \"To declare a variable with automatic storage duration.\", B: \"To automatically convert a variable to another type.\", C: \"To deduce the type of a variable from its initializer.\", D: \"To create a variable that can hold any type.\" }, answer: \"C\", hint: \"It saves you from typing out long, complex type names, especially with iterators or templates.\", feedback: { C: \"Correct! The `auto` keyword tells the compiler to automatically deduce the variable's type from the expression it is initialized with.\" } },\n                { category: \"OOP\", question: \"What is a destructor?\", options: { A: \"A function that deletes an object's code.\", B: \"A member function that is called when an object's lifetime ends.\", C: \"A tool for debugging memory leaks.\", D: \"The first function called in a class.\" }, answer: \"B\", hint: \"Its name is the class name preceded by a tilde (~). It's used for cleanup.\", feedback: { B: \"Correct! A destructor, e.g., `~MyClass()`, is a special member function that is automatically called to clean up resources when an object goes out of scope or is explicitly deleted.\" } },\n                { category: \"C++11\", question: \"Which syntax represents a range-based for loop?\", options: { A: \"for (int i; i &lt; vec.size(); ++i)\", B: \"for (int i : vec)\", C: \"for each (int i in vec)\", D: \"for (auto i = vec.begin(); i != vec.end(); ++i)\" }, answer: \"B\", hint: \"This modern C++ feature simplifies iterating over all elements in a container.\", feedback: { B: \"Correct! The `for (declaration : range)` syntax allows for cleaner and safer iteration over the elements of a container like a `std::vector`.\" } },\n                { category: \"STL\", question: \"Which STL container is typically implemented as a red-black tree and stores unique elements in sorted order?\", options: { A: \"std::vector\", B: \"std::list\", C: \"std::map\", D: \"std::set\" }, answer: \"D\", hint: \"Another container, `std::map`, also uses a red-black tree but stores key-value pairs.\", feedback: { D: \"Correct! `std::set` is an associative container that stores a sorted set of unique objects of type Key.\", C: \"`std::map` stores key-value pairs, also sorted by key.\" } },\n                { category: \"Pointers & References\", question: \"What is a null pointer?\", options: { A: \"A pointer to an empty object.\", B: \"A pointer that has not been initialized.\", C: \"A pointer that intentionally points to nothing.\", D: \"A pointer of type `void*`.\" }, answer: \"C\", hint: \"In modern C++, the keyword `nullptr` is used to represent this.\", feedback: { C: \"Correct! A null pointer is a special pointer that does not point to any object or function. It's used to signify the absence of an address.\" } }\n            ],\n            advanced: [\n                { category: \"OOP\", question: \"Which C++ feature is used to achieve runtime polymorphism?\", options: { A: \"Function Overloading\", B: \"Templates\", C: \"Virtual Functions\", D: \"Operator Overloading\" }, answer: \"C\", hint: \"This mechanism allows a derived class to provide its own implementation of a base class function, which is resolved at runtime through a pointer or reference.\", feedback: { C: \"Correct! `virtual` functions, combined with inheritance and pointers\/references to base classes, enable dynamic dispatch, which is the mechanism for runtime polymorphism.\" } },\n                { category: \"Templates\", question: \"What is the primary purpose of templates in C++?\", options: { A: \"To create class instances at runtime.\", B: \"To write generic code that can work with different data types.\", C: \"To automatically generate documentation.\", D: \"To manage memory allocation for objects.\" }, answer: \"B\", hint: \"They allow you to define functions and classes without specifying the exact types they will operate on.\", feedback: { B: \"Correct! Templates enable generic programming by allowing types to be parameters in class or function definitions, promoting code reuse.\" } },\n                { category: \"Core Concepts\", question: \"What is RAII (Resource Acquisition Is Initialization)?\", options: { A: \"A design pattern for creating objects.\", B: \"A rule that states all variables must be initialized when declared.\", C: \"An idiom where resource lifetime is tied to the lifetime of an object with automatic storage duration.\", D: \"A memory allocation technique for resources.\" }, answer: \"C\", hint: \"Smart pointers like `std::unique_ptr` are a perfect example of this principle.\", feedback: { C: \"Correct! RAII is a core C++ concept that ensures resources (memory, files, sockets) are properly released by binding their lifetime to an object's scope. The resource is acquired in the constructor and released in the destructor.\" } },\n                { category: \"Smart Pointers\", question: \"Which smart pointer should be used to express exclusive ownership of a resource?\", options: { A: \"std::shared_ptr\", B: \"std::unique_ptr\", C: \"std::weak_ptr\", D: \"auto_ptr\" }, answer: \"B\", hint: \"This type of smart pointer cannot be copied, only moved.\", feedback: { B: \"Correct! `std::unique_ptr` is a lightweight smart pointer that maintains exclusive ownership. When the `unique_ptr` goes out of scope, it automatically deletes the resource it points to.\", D: \"`auto_ptr` is deprecated and should not be used.\" } },\n                { category: \"C++11\", question: \"What does an rvalue reference, denoted by `&&`, primarily enable?\", options: { A: \"Perfect forwarding\", B: \"Move semantics\", C: \"Lambda expressions\", D: \"Both A and B\" }, answer: \"D\", hint: \"It allows functions to distinguish between temporary objects (rvalues) and persistent objects (lvalues).\", feedback: { D: \"Correct! Rvalue references are the core feature that enables both move semantics (efficiently transferring resources from temporary objects) and perfect forwarding (passing arguments through function calls without changing their lvalue\/rvalue nature).\" } },\n                { category: \"OOP\", question: \"How do you create a pure virtual function to make a class abstract?\", options: { A: \"By adding the `abstract` keyword.\", B: \"By prefixing the function with `pure virtual`.\", C: \"By providing an empty function body `{}`.\", D: \"By assigning `= 0` to a virtual function declaration.\" }, answer: \"D\", hint: \"This syntax indicates that the function has no implementation in the base class and must be implemented by derived classes.\", feedback: { D: \"Correct! A function like `virtual void draw() = 0;` is a pure virtual function. A class containing one or more pure virtual functions is an abstract class and cannot be instantiated.\" } },\n                { category: \"Exception Handling\", question: \"Which statement is used to signal that an error has occurred?\", options: { A: \"catch\", B: \"throw\", C: \"try\", D: \"except\" }, answer: \"B\", hint: \"You `try` a block of code, `throw` an exception on error, and `catch` it to handle it.\", feedback: { B: \"Correct! The `throw` keyword is used to raise an exception, transferring control to the nearest exception handler.\" } },\n                { category: \"C++11\", question: \"What is a lambda expression in C++?\", options: { A: \"A way to define a constant expression.\", B: \"An anonymous, inline function object.\", C: \"A macro for generating functions.\", D: \"A template specialization.\" }, answer: \"B\", hint: \"Its syntax starts with `[]`, known as the capture clause.\", feedback: { B: \"Correct! A lambda expression is a convenient way to define an unnamed function object right at the location where it is invoked or passed as an argument.\" } },\n                { category: \"Core Concepts\", question: \"What is the 'Rule of Three\/Five'?\", options: { A: \"A guideline stating a class should have no more than 3 to 5 public methods.\", B: \"A rule of thumb about template metaprogramming recursion depth.\", C: \"A guideline for class design: if you define any of a destructor, copy constructor, or copy assignment operator, you should probably define all three (or five, including move operations).\", D: \"A memory model for multithreading.\" }, answer: \"C\", hint: \"This rule helps prevent common bugs related to resource management in classes that manage memory or other resources directly.\", feedback: { C: \"Correct! The Rule of Three (pre-C++11) states that if a class needs a user-defined destructor, copy constructor, or copy assignment operator, it likely needs all three. The Rule of Five extends this to include the move constructor and move assignment operator.\" } },\n                { category: \"Casting\", question: \"Which C++ cast should be used for safe downcasting in a polymorphic class hierarchy?\", options: { A: \"static_cast\", B: \"reinterpret_cast\", C: \"const_cast\", D: \"dynamic_cast\" }, answer: \"D\", hint: \"This cast performs a runtime check to ensure the conversion is valid.\", feedback: { D: \"Correct! `dynamic_cast` is used for converting pointers and references within an inheritance hierarchy. It performs a runtime check and returns `nullptr` (for pointers) or throws `std::bad_cast` (for references) if the cast is invalid.\" } },\n                { category: \"OOP\", question: \"What is the difference between `override` and `final`?\", options: { A: \"`override` is for data members, `final` is for functions.\", B: \"`override` ensures a function is overriding a base class virtual function; `final` prevents a virtual function from being overridden further.\", C: \"`final` ensures a function is overriding a base class function; `override` prevents a function from being overridden further.\", D: \"They are synonyms and can be used interchangeably.\" }, answer: \"B\", hint: \"`override` is a check for the programmer, while `final` is a restriction for future derived classes.\", feedback: { B: \"Correct! `override` is a specifier that tells the compiler the function is meant to override a base class virtual function (causing an error if it doesn't). `final` prevents a virtual function from being overridden in any subsequent derived classes.\" } },\n                { category: \"Core Concepts\", question: \"What is the primary difference between `const` and `constexpr`?\", options: { A: \"`const` applies to variables, `constexpr` applies to functions.\", B: \"`constexpr` indicates a value is constant, while `const` indicates it is read-only.\", C: \"A `constexpr` must be evaluatable at compile-time, while a `const` variable's value might be determined at runtime.\", D: \"There is no difference in modern C++.\" }, answer: \"C\", hint: \"One of these allows the value to be used in contexts that require a compile-time constant, like a non-type template argument.\", feedback: { C: \"Correct! `constexpr` is a stronger guarantee than `const`. It specifies that an expression *can* be evaluated at compile-time, making it usable in more contexts. A `const` variable is simply one that cannot be modified after initialization.\" } },\n                { category: \"Multithreading\", question: \"Which header is required to use `std::thread`?\", options: { A: \"&lt;atomic&gt;\", B: \"&lt;thread&gt;\", C: \"&lt;mutex&gt;\", D: \"&lt;future&gt;\" }, answer: \"B\", hint: \"The name of the header directly matches the name of the primary class it provides.\", feedback: { B: \"Correct! The `&lt;thread&gt;` header contains the definitions for `std::thread` and related functions like `std::this_thread` for creating and managing threads.\" } },\n                { category: \"Templates\", question: \"What is SFINAE (Substitution Failure Is Not An Error)?\", options: { A: \"A runtime error that occurs when a template cannot be instantiated.\", B: \"A design pattern for writing safe templates.\", C: \"A compiler rule: when substituting a type in a template declaration fails, the compiler tries another overload instead of throwing an error.\", D: \"An error that occurs when a `virtual` function fails to be substituted.\" }, answer: \"C\", hint: \"This principle is a fundamental part of template metaprogramming and is often used with `std::enable_if`.\", feedback: { C: \"Correct! SFINAE is a key principle that allows for powerful template-based compile-time logic. If a template substitution results in an invalid type or expression, the compiler simply ignores that overload and looks for a better match.\" } },\n                { category: \"Smart Pointers\", question: \"What is the purpose of `std::weak_ptr`?\", options: { A: \"To hold a non-owning ('weak') reference to an object managed by a `std::shared_ptr`.\", B: \"A less performant version of `std::shared_ptr`.\", C: \"A pointer that can be automatically nullified.\", D: \"To replace raw pointers in legacy code.\" }, answer: \"A\", hint: \"It's used to break circular dependency cycles between `std::shared_ptr` instances.\", feedback: { A: \"Correct! A `std::weak_ptr` holds a non-owning reference and does not contribute to the reference count of a `std::shared_ptr`. It is used to observe an object without preventing its deletion and to break reference cycles.\" } }\n            ]\n        };\n        \/\/ --- STATE ---\n        let quizState = {\n            difficulty: null,\n            questions: [],\n            currentIndex: 0,\n            userAnswers: [],\n            timerInterval: null,\n            totalSeconds: 0,\n        };\n        let selectedDifficulty = null;\n        \/\/ --- CORE FUNCTIONS ---\n        function showScreen(screenId) {\n            document.querySelectorAll('#cpp-quiz-app-wrapper .quiz-screen').forEach(screen => {\n                screen.classList.remove('active');\n            });\n            const targetScreen = document.getElementById(screenId);\n            if (targetScreen) {\n                targetScreen.classList.add('active');\n            }\n        }\n        function startTimer() {\n            if (quizState.timerInterval) clearInterval(quizState.timerInterval);\n            quizState.timerInterval = setInterval(() => {\n                quizState.totalSeconds++;\n                const mins = Math.floor(quizState.totalSeconds \/ 60).toString().padStart(2, '0');\n                const secs = (quizState.totalSeconds % 60).toString().padStart(2, '0');\n                const timerEl = document.querySelector('#quiz-view #timer');\n                if(timerEl) timerEl.textContent = `${mins}:${secs}`;\n            }, 1000);\n        }\n        function stopTimer() {\n            clearInterval(quizState.timerInterval);\n        }\n        function resetQuizState() {\n            stopTimer();\n            quizState = {\n                difficulty: null, questions: [], currentIndex: 0, userAnswers: [], timerInterval: null, totalSeconds: 0,\n            };\n        }\n        window.showMainMenu = function(confirmFirst = false) {\n            if (confirmFirst) {\n                if (confirm('Are you sure you want to exit? Your progress will be lost.')) {\n                    resetQuizState();\n                    sessionStorage.removeItem('cppQuizResultState'); \/\/ Clear saved state\n                    showScreen('main-menu-view');\n                }\n            } else {\n                resetQuizState();\n                sessionStorage.removeItem('cppQuizResultState'); \/\/ Clear saved state\n                showScreen('main-menu-view');\n            }\n        }\n        window.showUserDetailsView = function(difficulty) {\n            const userInfoJSON = localStorage.getItem('quizUserInfo');\n            if (userInfoJSON) {\n                try {\n                    const userInfo = JSON.parse(userInfoJSON);\n                    if (new Date().getTime() < userInfo.expires) {\n                        startQuiz(difficulty);\n                        return;\n                    }\n                } catch(e) { \/* Invalid JSON *\/ }\n            }\n            selectedDifficulty = difficulty;\n            showScreen('user-details-view');\n            document.getElementById('user-name').focus();\n        }\n        function startQuiz(difficulty) {\n            quizState = {\n                difficulty,\n                questions: quizData[difficulty] || [],\n                currentIndex: 0,\n                userAnswers: new Array((quizData[difficulty] || []).length).fill(null),\n                timerInterval: null,\n                totalSeconds: 0,\n            };\n            showScreen('quiz-view');\n            setupQuizUI();\n            loadQuestion();\n            startTimer();\n        }\n        function setupQuizUI() {\n            const quizScreenEl = document.getElementById('quiz-view');\n            if (!quizScreenEl) return;\n            const quizTitle = quizScreenEl.querySelector('#quiz-title');\n            const questionCount = quizScreenEl.querySelector('#question-count');\n            const stepper = quizScreenEl.querySelector('#progress-stepper');\n            const timer = quizScreenEl.querySelector('#timer');\n            if (quizTitle) quizTitle.textContent = `${quizState.difficulty.charAt(0).toUpperCase() + quizState.difficulty.slice(1)} C++ Quiz`;\n            if (questionCount) questionCount.textContent = `${quizState.currentIndex + 1}\/${quizState.questions.length}`;\n            if (timer) timer.textContent = '00:00';\n            if (stepper) stepper.innerHTML = quizState.questions.map(() => `<div class=\"step\"><\/div>`).join('');\n        }\n        function loadQuestion() {\n            const quizScreenEl = document.getElementById('quiz-view');\n            if (!quizScreenEl) return;\n            const question = quizState.questions[quizState.currentIndex];\n            if (!question) return;\n            const questionText = quizScreenEl.querySelector('.cpp-quiz-question-text');\n            const optionsContainer = quizScreenEl.querySelector('#options-container');\n            const hintText = quizScreenEl.querySelector('#hint-text');\n            const hintToggle = quizScreenEl.querySelector('#hint-toggle');\n            const questionCountEl = quizScreenEl.querySelector('#question-count');\n            if (questionCountEl) questionCountEl.textContent = `${quizState.currentIndex + 1}\/${quizState.questions.length}`;\n            \n            \/\/ Use .innerHTML to render the encoded entities\n            if (questionText) questionText.innerHTML = `${quizState.currentIndex + 1}. ${question.question}`;\n            \n            if (optionsContainer) {\n                optionsContainer.innerHTML = '';\n                Object.entries(question.options).forEach(([key, value]) => {\n                    const optionDiv = document.createElement('div');\n                    optionDiv.className = 'option';\n                    optionDiv.dataset.key = key;\n                    \/\/ Use .innerHTML here as well\n                    optionDiv.innerHTML = `<label class=\"option-label\"><span class=\"option-letter\">${key}.<\/span> ${value}<\/label>`;\n                    optionDiv.addEventListener('click', () => handleOptionClick(key));\n                    optionsContainer.appendChild(optionDiv);\n                });\n            }\n            if (hintText) {\n                \/\/ Use .innerHTML here as well\n                hintText.innerHTML = question.hint;\n                hintText.classList.add('hidden');\n            }\n            if (hintToggle) {\n                hintToggle.classList.remove('open');\n                hintToggle.disabled = false;\n            }\n            updateProgress();\n            restoreAnswerState();\n        }\n        function handleOptionClick(selectedKey) {\n            if (quizState.userAnswers[quizState.currentIndex] !== null) return;\n            const question = quizState.questions[quizState.currentIndex];\n            const isCorrect = selectedKey === question.answer;\n            quizState.userAnswers[quizState.currentIndex] = { selected: selectedKey, isCorrect };\n            const quizScreenEl = document.getElementById('quiz-view');\n            if (!quizScreenEl) return;\n            quizScreenEl.querySelectorAll('.option').forEach(opt => {\n                opt.classList.add('disabled');\n                if (opt.dataset.key === question.answer) {\n                    opt.classList.add('correct');\n                    addFeedback(opt, true);\n                } else if (opt.dataset.key === selectedKey) {\n                    opt.classList.add('incorrect');\n                    addFeedback(opt, false);\n                }\n            });\n            const hintToggle = quizScreenEl.querySelector('#hint-toggle');\n            if (hintToggle) hintToggle.disabled = true;\n            updateProgress();\n        }\n        function addFeedback(optionDiv, isCorrect) {\n            const question = quizState.questions[quizState.currentIndex];\n            const selectedKey = optionDiv.dataset.key;\n            const feedbackText = question.feedback[selectedKey] || (isCorrect ? question.feedback[question.answer] : \"That's not the correct choice.\");\n            if (!optionDiv.querySelector('.feedback')) {\n                \/\/ Use .innerHTML for the feedback text\n                optionDiv.querySelector('.option-label').insertAdjacentHTML('afterend', `\n                <div class=\"feedback\">\n                    <div class=\"feedback-title ${isCorrect ? 'correct' : 'incorrect'}\">${isCorrect ? '\u2713 Correct' : '\u2717 Incorrect'}<\/div>\n                    <div class=\"feedback-text\">${feedbackText}<\/div>\n                <\/div>`);\n            }\n        }\n        function restoreAnswerState() {\n            const answer = quizState.userAnswers[quizState.currentIndex];\n            const quizScreenEl = document.getElementById('quiz-view');\n            if (!quizScreenEl) return;\n            if (answer) {\n                quizScreenEl.querySelectorAll('.option').forEach(opt => {\n                    opt.classList.add('disabled');\n                    if (opt.dataset.key === quizState.questions[quizState.currentIndex].answer) {\n                        opt.classList.add('correct');\n                        if (opt.dataset.key === answer.selected) addFeedback(opt, true);\n                    } else if (opt.dataset.key === answer.selected) {\n                        opt.classList.add('incorrect');\n                        addFeedback(opt, false);\n                    }\n                });\n            }\n        }\n        function updateProgress() {\n            const quizScreenEl = document.getElementById('quiz-view');\n            if (!quizScreenEl) return;\n            const backBtn = quizScreenEl.querySelector('#back-btn');\n            const nextBtn = quizScreenEl.querySelector('#next-btn');\n            const stepper = quizScreenEl.querySelector('#progress-stepper');\n            if (backBtn) backBtn.disabled = quizState.currentIndex === 0;\n            if (nextBtn) nextBtn.textContent = (quizState.currentIndex === quizState.questions.length - 1) ? 'Finish' : 'Next';\n            if(stepper) {\n                [...stepper.children].forEach((step, i) => {\n                    step.className = 'step';\n                    if (i === quizState.currentIndex) step.classList.add('active');\n                    const answer = quizState.userAnswers[i];\n                    if (answer) step.classList.add(answer.isCorrect ? 'correct' : 'incorrect');\n                });\n            }\n        }\n        function showResults() {\n            stopTimer();\n            const correctCount = quizState.userAnswers.filter(a => a?.isCorrect).length;\n            const totalQuestions = quizState.questions.length;\n            const answeredCount = quizState.userAnswers.filter(a => a !== null).length;\n            const wrongCount = answeredCount - correctCount;\n            const skippedCount = totalQuestions - answeredCount;\n            const accuracy = answeredCount > 0 ? Math.round((correctCount \/ answeredCount) * 100) : 0;\n            const scorePercentage = totalQuestions > 0 ? Math.round((correctCount \/ totalQuestions) * 100) : 0;\n            \n            \/\/ Save quiz state to sessionStorage to persist results\n            sessionStorage.setItem('cppQuizResultState', JSON.stringify(quizState));\n\n            \/\/ Populate new results view elements\n            document.querySelector('#new-score-value').innerHTML = `${correctCount}<span>\/${totalQuestions}<\/span>`;\n            document.querySelector('#new-accuracy-label').textContent = `${accuracy}% Accuracy`;\n            document.querySelector('#new-right-value').textContent = correctCount;\n            document.querySelector('#new-wrong-value').textContent = wrongCount;\n            document.querySelector('#new-skipped-value').textContent = skippedCount;\n            \n            \/\/ Animate progress circle\n            const circle = document.getElementById('score-circle');\n            const radius = circle.r.baseVal.value;\n            const circumference = radius * 2 * Math.PI;\n            circle.style.strokeDasharray = `${circumference} ${circumference}`;\n            setTimeout(() => {\n                const offset = circumference - scorePercentage \/ 100 * circumference;\n                circle.style.strokeDashoffset = offset;\n            }, 100);\n            \n            setupShareLinks(correctCount, accuracy);\n            showScreen('results-view');\n        }\n        function setupShareLinks(score, accuracy) {\n            const url = window.location.href;\n            const text = `I scored ${score}\/${quizState.questions.length} on the ${quizState.difficulty} C++ Quiz! Can you beat my score?`;\n            const title = 'C++ Quiz Challenge';\n            \n            \/\/ Update to new share link IDs\n            document.getElementById('new-share-whatsapp').onclick = (e) => { e.preventDefault(); window.open(`https:\/\/api.whatsapp.com\/send?text=${encodeURIComponent(text + '\\n\\n' + url)}`, '_blank'); };\n            document.getElementById('new-share-twitter').onclick = (e) => { e.preventDefault(); window.open(`https:\/\/twitter.com\/intent\/tweet?url=${encodeURIComponent(url)}&text=${encodeURIComponent(text)}`, '_blank'); };\n            document.getElementById('new-share-linkedin').onclick = (e) => { e.preventDefault(); window.open(`https:\/\/www.linkedin.com\/shareArticle?mini=true&url=${encodeURIComponent(url)}&title=${encodeURIComponent(title)}&summary=${encodeURIComponent(text)}`, '_blank'); };\n            document.getElementById('new-share-telegram').onclick = (e) => { e.preventDefault(); window.open(`https:\/\/t.me\/share\/url?url=${encodeURIComponent(url)}&text=${encodeURIComponent(text)}`, '_blank'); };\n        }\n        function handleUserDetailsSubmit(event) {\n            event.preventDefault();\n            const form = document.getElementById('user-details-form');\n            const name = form.querySelector('#user-name').value.trim();\n            const email = form.querySelector('#user-email').value.trim();\n            if (!name || !email) { alert('Please fill in both your name and email.'); return; }\n            const expirationTime = new Date().getTime() + (60 * 24 * 60 * 60 * 1000); \/\/ 60 days\n            localStorage.setItem('quizUserInfo', JSON.stringify({ expires: expirationTime }));\n            \n            \/\/ Submit to Google Form\n            const formURL = \"https:\/\/docs.google.com\/forms\/d\/e\/1FAIpQLScAVF17oENbZXTwsTuQ7VzwLPeT6IG5iilch2LoEoYsbzik5A\/formResponse\";\n            const formData = new FormData();\n            formData.append(\"entry.1956958717\", name); \/\/ Name field\n            formData.append(\"entry.1149718564\", email); \/\/ Email field\n            formData.append(\"entry.1658362758\", window.location.href);\n            fetch(formURL, { method: \"POST\", body: formData, mode: \"no-cors\" }).catch(console.error);\n            form.reset();\n            startQuiz(selectedDifficulty);\n        }\n        \/\/ --- EVENT LISTENERS ---\n        document.getElementById('user-details-form').addEventListener('submit', handleUserDetailsSubmit);\n        document.getElementById('back-to-menu-btn').addEventListener('click', () => showMainMenu(false));\n        document.getElementById('back-to-results-btn').addEventListener('click', () => showScreen('results-view'));\n        document.getElementById('next-btn').addEventListener('click', () => {\n             if (quizState.currentIndex < quizState.questions.length - 1) {\n                 quizState.currentIndex++;\n                 loadQuestion();\n             } else {\n                 showResults();\n             }\n          });\n        document.getElementById('back-btn').addEventListener('click', () => {\n             if (quizState.currentIndex > 0) {\n                 quizState.currentIndex--;\n                 loadQuestion();\n             }\n          });\n        document.getElementById('hint-toggle').addEventListener('click', () => {\n             document.getElementById('hint-text').classList.toggle('hidden');\n             document.getElementById('hint-toggle').classList.toggle('open');\n          });\n        document.getElementById('analyse-btn').addEventListener('click', () => {\n            const analysisByCat = quizState.questions.reduce((acc, { category }, i) => {\n                if (!acc[category]) acc[category] = { total: 0, correct: 0, correctQs: [], incorrectQs: [] };\n                acc[category].total++;\n                const answer = quizState.userAnswers[i];\n                if (answer?.isCorrect) {\n                    acc[category].correct++;\n                    acc[category].correctQs.push(i + 1);\n                } else if (answer) {\n                    acc[category].incorrectQs.push(i + 1);\n                }\n                return acc;\n            }, {});\n            const analysisModalBody = document.getElementById('analysis-body');\n            analysisModalBody.innerHTML = Object.entries(analysisByCat).map(([category, data]) => {\n                const percentage = data.total > 0 ? Math.round((data.correct \/ data.total) * 100) : 0;\n                return `<div class=\"category-analysis\"><div class=\"category-header\"><h3 id=\"category\">${category}<\/h3><div class=\"category-score\">${percentage}% Correct<\/div><\/div><div class=\"progress-bar-bg\"><div class=\"progress-bar-fg\" style=\"width: ${percentage}%;\"><\/div><\/div><div class=\"question-breakdown\">${data.correctQs.length > 0 ? `<p><strong>Correct:<\/strong> Q${data.correctQs.join(', Q')}<\/p>` : ''}${data.incorrectQs.length > 0 ? `<span>Incorrect:<\/span> Q${data.incorrectQs.join(', Q')}` : ''}<\/div><\/div>`;\n            }).join('');\n            showScreen('analysis-view');\n        });\n\n        \/\/ --- INITIALIZATION ---\n        \/\/ Check for saved results on page load\n        const savedStateJSON = sessionStorage.getItem('cppQuizResultState');\n        if (savedStateJSON) {\n            try {\n                quizState = JSON.parse(savedStateJSON);\n                \/\/ Stop any lingering timers if the user refreshed mid-quiz\n                if (quizState.timerInterval) clearInterval(quizState.timerInterval);\n                showResults();\n            } catch (e) {\n                console.error(\"Failed to parse saved quiz state.\", e);\n                sessionStorage.removeItem('cppQuizResultState');\n                showScreen('main-menu-view');\n            }\n        } else {\n            showScreen('main-menu-view');\n        }\n    });\n    <\/script>\n<\/div>\n\n\n\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\">\n<p><strong>Also Check:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.mygreatlearning.com\/blog\/cpp-compiler-tool\/\">Online C++ Compiler<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.mygreatlearning.com\/blog\/cpp-exercises\/\">C++ Practice Questions and Exercise<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.mygreatlearning.com\/blog\/cpp-projects\/\">C++ Projects<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.mygreatlearning.com\/blog\/cpp-interview-questions\/\">Top C++ Interview Questions and Answers<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.mygreatlearning.com\/blog\/back-end-developer\/\">How to Become a Back-end Developer<\/a><\/li>\n<\/ul>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Test your C++ skills with this interactive quiz. Choose your level - Beginner, Intermediate, or Advanced. Answer MCQs on key topics and track your progress. Share your score with friends.<\/p>\n","protected":false},"author":41,"featured_media":112830,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"full-width-container","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"disabled","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[25860],"tags":[36801,36874],"class_list":["post-112827","page","type-page","status-publish","has-post-thumbnail","hentry","category-software","tag-c-programming","tag-quiz"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>C++ Multiple Choice Questions (Quiz)<\/title>\n<meta name=\"description\" content=\"Test your C++ skills with this interactive quiz. Choose your level - Beginner, Intermediate, or Advanced. Answer MCQs on key topics and track your progress. Share your score with friends.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.mygreatlearning.com\/blog\/cpp-quiz\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"C++ Quiz\" \/>\n<meta property=\"og:description\" content=\"Test your C++ skills with this interactive quiz. Choose your level - Beginner, Intermediate, or Advanced. Answer MCQs on key topics and track your progress. Share your score with friends.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.mygreatlearning.com\/blog\/cpp-quiz\/\" \/>\n<meta property=\"og:site_name\" content=\"Great Learning Blog: Free Resources what Matters to shape your Career!\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/GreatLearningOfficial\/\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/10\/cpp-quiz.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1408\" \/>\n\t<meta property=\"og:image:height\" content=\"768\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@Great_Learning\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/cpp-quiz\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/cpp-quiz\\\/\"},\"author\":{\"name\":\"Great Learning Editorial Team\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/person\\\/6f993d1be4c584a335951e836f2656ad\"},\"headline\":\"C++ Quiz\",\"datePublished\":\"2025-10-18T22:50:37+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/cpp-quiz\\\/\"},\"wordCount\":349,\"publisher\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/cpp-quiz\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/cpp-quiz.webp\",\"keywords\":[\"C++ Programming\",\"quiz\"],\"articleSection\":[\"IT\\\/Software Development\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/cpp-quiz\\\/\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/cpp-quiz\\\/\",\"name\":\"C++ Multiple Choice Questions (Quiz)\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/cpp-quiz\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/cpp-quiz\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/cpp-quiz.webp\",\"datePublished\":\"2025-10-18T22:50:37+00:00\",\"description\":\"Test your C++ skills with this interactive quiz. Choose your level - Beginner, Intermediate, or Advanced. Answer MCQs on key topics and track your progress. Share your score with friends.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/cpp-quiz\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/cpp-quiz\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/cpp-quiz\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/cpp-quiz.webp\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/cpp-quiz.webp\",\"width\":1408,\"height\":768,\"caption\":\"C++ MCQ\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/cpp-quiz\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"C++ Quiz\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\",\"name\":\"Great Learning Blog\",\"description\":\"Learn, Upskill &amp; Career Development Guide and Resources\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\"},\"alternateName\":\"Great Learning\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\",\"name\":\"Great Learning\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/GL-Logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/GL-Logo.jpg\",\"width\":900,\"height\":900,\"caption\":\"Great Learning\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/GreatLearningOfficial\\\/\",\"https:\\\/\\\/x.com\\\/Great_Learning\",\"https:\\\/\\\/www.instagram.com\\\/greatlearningofficial\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/school\\\/great-learning\\\/\",\"https:\\\/\\\/in.pinterest.com\\\/greatlearning12\\\/\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/beaconelearning\\\/\"],\"description\":\"Great Learning is a leading global ed-tech company for professional training and higher education. It offers comprehensive, industry-relevant, hands-on learning programs across various business, technology, and interdisciplinary domains driving the digital economy. These programs are developed and offered in collaboration with the world's foremost academic institutions.\",\"email\":\"info@mygreatlearning.com\",\"legalName\":\"Great Learning Education Services Pvt. Ltd\",\"foundingDate\":\"2013-11-29\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"1001\",\"maxValue\":\"5000\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/person\\\/6f993d1be4c584a335951e836f2656ad\",\"name\":\"Great Learning Editorial Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"caption\":\"Great Learning Editorial Team\"},\"description\":\"The Great Learning Editorial Staff includes a dynamic team of subject matter experts, instructors, and education professionals who combine their deep industry knowledge with innovative teaching methods. Their mission is to provide learners with the skills and insights needed to excel in their careers, whether through upskilling, reskilling, or transitioning into new fields.\",\"sameAs\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/\",\"https:\\\/\\\/in.linkedin.com\\\/school\\\/great-learning\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/Great_Learning\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCObs0kLIrDjX2LLSybqNaEA\"],\"award\":[\"Best EdTech Company of the Year 2024\",\"Education Economictimes Outstanding Education\\\/Edtech Solution Provider of the Year 2024\",\"Leading E-learning Platform 2024\"],\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/author\\\/greatlearning\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"C++ Multiple Choice Questions (Quiz)","description":"Test your C++ skills with this interactive quiz. Choose your level - Beginner, Intermediate, or Advanced. Answer MCQs on key topics and track your progress. Share your score with friends.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.mygreatlearning.com\/blog\/cpp-quiz\/","og_locale":"en_US","og_type":"article","og_title":"C++ Quiz","og_description":"Test your C++ skills with this interactive quiz. Choose your level - Beginner, Intermediate, or Advanced. Answer MCQs on key topics and track your progress. Share your score with friends.","og_url":"https:\/\/www.mygreatlearning.com\/blog\/cpp-quiz\/","og_site_name":"Great Learning Blog: Free Resources what Matters to shape your Career!","article_publisher":"https:\/\/www.facebook.com\/GreatLearningOfficial\/","og_image":[{"width":1408,"height":768,"url":"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/10\/cpp-quiz.webp","type":"image\/webp"}],"twitter_card":"summary_large_image","twitter_site":"@Great_Learning","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.mygreatlearning.com\/blog\/cpp-quiz\/#article","isPartOf":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/cpp-quiz\/"},"author":{"name":"Great Learning Editorial Team","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/person\/6f993d1be4c584a335951e836f2656ad"},"headline":"C++ Quiz","datePublished":"2025-10-18T22:50:37+00:00","mainEntityOfPage":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/cpp-quiz\/"},"wordCount":349,"publisher":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/cpp-quiz\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/10\/cpp-quiz.webp","keywords":["C++ Programming","quiz"],"articleSection":["IT\/Software Development"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.mygreatlearning.com\/blog\/cpp-quiz\/","url":"https:\/\/www.mygreatlearning.com\/blog\/cpp-quiz\/","name":"C++ Multiple Choice Questions (Quiz)","isPartOf":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/cpp-quiz\/#primaryimage"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/cpp-quiz\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/10\/cpp-quiz.webp","datePublished":"2025-10-18T22:50:37+00:00","description":"Test your C++ skills with this interactive quiz. Choose your level - Beginner, Intermediate, or Advanced. Answer MCQs on key topics and track your progress. Share your score with friends.","breadcrumb":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/cpp-quiz\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.mygreatlearning.com\/blog\/cpp-quiz\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/cpp-quiz\/#primaryimage","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/10\/cpp-quiz.webp","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/10\/cpp-quiz.webp","width":1408,"height":768,"caption":"C++ MCQ"},{"@type":"BreadcrumbList","@id":"https:\/\/www.mygreatlearning.com\/blog\/cpp-quiz\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/www.mygreatlearning.com\/blog\/"},{"@type":"ListItem","position":2,"name":"C++ Quiz"}]},{"@type":"WebSite","@id":"https:\/\/www.mygreatlearning.com\/blog\/#website","url":"https:\/\/www.mygreatlearning.com\/blog\/","name":"Great Learning Blog","description":"Learn, Upskill &amp; Career Development Guide and Resources","publisher":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization"},"alternateName":"Great Learning","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.mygreatlearning.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization","name":"Great Learning","url":"https:\/\/www.mygreatlearning.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/GL-Logo.jpg","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/GL-Logo.jpg","width":900,"height":900,"caption":"Great Learning"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/GreatLearningOfficial\/","https:\/\/x.com\/Great_Learning","https:\/\/www.instagram.com\/greatlearningofficial\/","https:\/\/www.linkedin.com\/school\/great-learning\/","https:\/\/in.pinterest.com\/greatlearning12\/","https:\/\/www.youtube.com\/user\/beaconelearning\/"],"description":"Great Learning is a leading global ed-tech company for professional training and higher education. It offers comprehensive, industry-relevant, hands-on learning programs across various business, technology, and interdisciplinary domains driving the digital economy. These programs are developed and offered in collaboration with the world's foremost academic institutions.","email":"info@mygreatlearning.com","legalName":"Great Learning Education Services Pvt. Ltd","foundingDate":"2013-11-29","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"1001","maxValue":"5000"}},{"@type":"Person","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/person\/6f993d1be4c584a335951e836f2656ad","name":"Great Learning Editorial Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","caption":"Great Learning Editorial Team"},"description":"The Great Learning Editorial Staff includes a dynamic team of subject matter experts, instructors, and education professionals who combine their deep industry knowledge with innovative teaching methods. Their mission is to provide learners with the skills and insights needed to excel in their careers, whether through upskilling, reskilling, or transitioning into new fields.","sameAs":["https:\/\/www.mygreatlearning.com\/","https:\/\/in.linkedin.com\/school\/great-learning\/","https:\/\/x.com\/https:\/\/twitter.com\/Great_Learning","https:\/\/www.youtube.com\/channel\/UCObs0kLIrDjX2LLSybqNaEA"],"award":["Best EdTech Company of the Year 2024","Education Economictimes Outstanding Education\/Edtech Solution Provider of the Year 2024","Leading E-learning Platform 2024"],"url":"https:\/\/www.mygreatlearning.com\/blog\/author\/greatlearning\/"}]}},"uagb_featured_image_src":{"full":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/10\/cpp-quiz.webp",1408,768,false],"thumbnail":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/10\/cpp-quiz-150x150.webp",150,150,true],"medium":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/10\/cpp-quiz-300x164.webp",300,164,true],"medium_large":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/10\/cpp-quiz-768x419.webp",768,419,true],"large":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/10\/cpp-quiz-1024x559.webp",1024,559,true],"1536x1536":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/10\/cpp-quiz.webp",1408,768,false],"2048x2048":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/10\/cpp-quiz.webp",1408,768,false],"web-stories-poster-portrait":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/10\/cpp-quiz-640x768.webp",640,768,true],"web-stories-publisher-logo":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/10\/cpp-quiz-96x96.webp",96,96,true],"web-stories-thumbnail":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2025\/10\/cpp-quiz-150x82.webp",150,82,true]},"uagb_author_info":{"display_name":"Great Learning Editorial Team","author_link":"https:\/\/www.mygreatlearning.com\/blog\/author\/greatlearning\/"},"uagb_comment_info":0,"uagb_excerpt":"Test your C++ skills with this interactive quiz. Choose your level - Beginner, Intermediate, or Advanced. Answer MCQs on key topics and track your progress. Share your score with friends.","_links":{"self":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/pages\/112827","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/comments?post=112827"}],"version-history":[{"count":4,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/pages\/112827\/revisions"}],"predecessor-version":[{"id":112831,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/pages\/112827\/revisions\/112831"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/media\/112830"}],"wp:attachment":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/media?parent=112827"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/categories?post=112827"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/tags?post=112827"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}