Skip to content

About

This is a Quiz Console Application developed in C++ that allows users to answer multiple-choice questions loaded from a file. The program provides immediate feedback on each response and calculates the final score at the end. The scores will be saved to a file for progress tracking.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

C++ Quiz Application

Project Overview

This is a console-based quiz application developed in C++. It allows users to answer multiple-choice questions loaded from a text file, provides immediate feedback on each response, calculates the final score, and saves the results to a file for progress tracking. This project was originally developed during my first semester of the Computer Science program as part of my introductory C++ coursework.

Features

  • Loads multiple-choice questions from an external text file
  • Provides immediate feedback for each answer
  • Calculates the user's final score
  • Saves user scores for progress tracking
  • Allows questions to be added, removed, or customized

How to Run

  1. Ensure questions.txt is in the same directory as main.cpp.

  2. Compile the program:

    Windows: g++ main.cpp -o quiz

    Mac/Linux: g++ main.cpp -o quiz

  3. Run the application:

    Windows: quiz.exe

    Mac/Linux: ./quiz

  4. Follow the prompts to enter your name and complete the quiz.

  5. The program creates a user_results.txt file containing user scores.

Customizing Questions

Questions can be added, removed, or modified by editing questions.txt.

Use the following format:

Question|Choice1|Choice2|Choice3|Choice4|CorrectAnswer

  • Each question must be on a new line.
  • The correct answer must be A, B, C, or D.
  • Do not add extra spaces around the | separators.

Technologies

  • C++
  • File I/O
  • Standard C++ Library

Author

Mahsa Fazli

About

This is a Quiz Console Application developed in C++ that allows users to answer multiple-choice questions loaded from a file. The program provides immediate feedback on each response and calculates the final score at the end. The scores will be saved to a file for progress tracking.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages