CPP - Problem Solving - debugging

Quiz
•
Information Technology (IT)
•
11th Grade
•
Hard
John Oli
Used 1+ times
FREE Resource
6 questions
Show all answers
1.
OPEN ENDED QUESTION
3 mins • 20 pts
Instructions:
You are given a buggy C++ program that is supposed to compute the salaries of 5 employees.
The program contains errors in syntax, casing, variables, operators, and computations.
Your task is to debug the program by rewriting it completely in its correct form.
The corrected program must:
Ask for hours worked and rate per hour for 5 employees
Compute and display each employee’s salary
Compute and display the total payroll
Compute and display the average salary of the 5 employees
Type your corrected program in Wayground and submit.
Evaluate responses using AI:
OFF
Answer explanation
2.
OPEN ENDED QUESTION
3 mins • 10 pts
Instructions:
You are given a buggy C++ program that is supposed to calculate the total cost of items.
The program contains errors in syntax, casing, operators, and variables.
Your task is to rewrite the entire program correctly.
The corrected program must:
Ask for the quantity of items
Ask for the price per item
Compute and display the total cost
Type your corrected program in Wayground and submit.
Evaluate responses using AI:
OFF
Answer explanation
3.
OPEN ENDED QUESTION
3 mins • 10 pts
Instruction
Rewrite the program correctly. Identify the errors in the code and fix them so that it runs without errors and produces the correct output.
Evaluate responses using AI:
OFF
Answer explanation
4.
OPEN ENDED QUESTION
3 mins • 10 pts
Instruction
Fix the syntax and logical errors so the program correctly computes the sum of two numbers.
Evaluate responses using AI:
OFF
Answer explanation
5.
OPEN ENDED QUESTION
3 mins • 10 pts
Instruction
Correct the program so that it properly displays the multiplication of two numbers.
Evaluate responses using AI:
OFF
Answer explanation
6.
OPEN ENDED QUESTION
3 mins • 20 pts
Instruction
The following program is supposed to take 5 exam scores from the user, compute the total and average, and display both results. However, the program has multiple errors that prevent it from compiling or working correctly.
👉 Your task is to rewrite the program with the correct syntax and logic.
Evaluate responses using AI:
OFF
Answer explanation
Similar Resources on Wayground
10 questions
Sequencing Blockly - 1

Quiz
•
7th Grade - University
10 questions
Arrays in CQuiz

Quiz
•
1st Grade - University
9 questions
Blockly Programming Quiz [Level 1B]

Quiz
•
7th Grade - University
10 questions
Uji Pemahaman Berpikir Komputasional

Quiz
•
10th Grade - University
10 questions
Scratch - základy

Quiz
•
6th Grade - University
10 questions
Assesmen Diagnostik

Quiz
•
11th Grade
5 questions
Karel If Statement Quiz

Quiz
•
11th Grade
10 questions
KODING DAN KA

Quiz
•
11th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Information Technology (IT)
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
6 questions
Rule of Law

Quiz
•
6th - 12th Grade
15 questions
ACT Math Practice Test

Quiz
•
9th - 12th Grade
18 questions
Hispanic Heritage Month

Quiz
•
KG - 12th Grade
28 questions
Ser vs estar

Quiz
•
9th - 12th Grade
10 questions
Would you rather...

Quiz
•
KG - University