CPP - Problem Solving - debugging
Quiz
•
Information Technology (IT)
•
11th Grade
•
Practice Problem
•
Hard
John Oli
Used 1+ times
FREE Resource
Enhance your content in a minute
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
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
Pengenalan Perangkat Lunak Kelas 7
Quiz
•
7th Grade - University
10 questions
Quiz konsep Algoritma
Quiz
•
11th Grade - University
10 questions
7 класс программирование
Quiz
•
7th Grade - University
10 questions
The Gartner Hype Cycle
Quiz
•
11th Grade
10 questions
Posttest for UKIN
Quiz
•
10th Grade - University
10 questions
Uji Pemahaman Berpikir Komputasioal
Quiz
•
8th Grade - University
10 questions
EmpoTech Quiz Bee
Quiz
•
11th Grade
10 questions
ASESMEN DIAGNOSTIK INFORMATIKA X DPB 2
Quiz
•
10th Grade - University
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
Discover more resources for Information Technology (IT)
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
15 questions
Christmas Song Emoji Pictionary
Quiz
•
7th - 12th Grade
20 questions
Christmas Movies
Quiz
•
1st - 12th Grade
20 questions
Christmas Movie Trivia
Quiz
•
9th - 12th Grade
29 questions
christmas facts
Lesson
•
5th - 12th Grade
20 questions
Christmas Trivia
Quiz
•
5th - 12th Grade
20 questions
Stages of Meiosis
Quiz
•
9th - 12th Grade
20 questions
christmas songs
Quiz
•
KG - University
