100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Other

Review for Linked Lists and Doubly Linked Lists

Rating
-
Sold
-
Pages
3
Uploaded on
06-11-2025
Written in
2025/2026

The provided code is a simple multiple-choice quiz program focused on Linked Lists and Doubly Linked Lists in C++. It includes a welcome message and instructions for users, along with five questions intended to assess knowledge of the subject. The key components of the code include: 1. **Variables**: A static counter keeps track of the number of questions asked, and a total counts correct answers. There are also variables for user input and answers. 2. **Functions**: The program defines several functions to handle checking answers, counting correct responses, displaying messages, and displaying results at the end of the quiz. 3. **Questions**: The program includes functions for individual questions, with `question1` and `question2` implemented. Each question requires user input, which is then checked against the correct answer. 4. **Message Handling**: Based on whether the user's answer is correct, appropriate feedback is provided. 5. **Result Display**: At the end, the program will summarize the user's performance based on the number of questions answered correctly compared to the total. Overall, the program is designed to facilitate testing knowledge in linked lists while offering an interactive user experience.

Show more Read less








Whoops! We can’t load your doc right now. Try again or contact support.

Document information

Uploaded on
November 6, 2025
Number of pages
3
Written in
2025/2026
Type
Other
Person
Unknown

Content preview

#include "LinkedLists.h"

int static counter = 0;
int static total = 0;
char input;
char answer;
string typedInput;
string typedAnswer;
bool correct;

bool checkCharAnswers(char input, char answer);
bool checkStringAnswers(string typedInput, string typedAnswer);
void counting(bool correct);
void charMessage(bool correct, char answer);
void stringMessage(bool correct, string typedAnswer);
void displayResult(int counter, int total);

void question1();
void question2();
void question3();
void question4();
void question5();


int main()
{
cout << "WELCOME to the review for Linked Lists and Doubly Linked Lists" <<
endl;
cout << "If you find any errors or have any ideas to better improve my code,
please let me know. I might not have spent a million hours putting this together."
<< endl << endl;
cout << "NOTE: Be wary that by using strings to hold standard input, whitespace
is also taken into consideration when comparing answers. Always check the outputted
answer when the program claims your answer was 'wrong'" << endl << endl;
cout << "P.S. Each question will specify what file you should/can look at to
guide your answers" << endl << endl << endl;

question1();

// counter++;
// cout << "Type the letter for your answer... ";
// cin >> input;
//
// correct = checkCharAnswers(input, answer);
// counting(correct);
// charMessage(correct, answer);
//
//
// cin.ignore();
// getline(cin, typedInput);
//
// counter++;
// correct = checkStringAnswers(typedInput, typedAnswer);
// counting(correct);
// stringMessage(correct, typedAnswer);
}

void question1()
{
$15.49
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
tinahuynh

Get to know the seller

Seller avatar
tinahuynh California State University, Long Beach
View profile
Follow You need to be logged in order to follow users or courses
Sold
New on Stuvia
Member since
1 month
Number of followers
0
Documents
68
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions