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
Teknologi Informasi dan Komunikasi
Quiz
•
11th Grade
10 questions
Network secutiry
Quiz
•
9th Grade - University
10 questions
Part 2
Quiz
•
11th Grade
10 questions
PRETEST KODING DAN KA
Quiz
•
5th Grade - University
10 questions
Ultrasonic Sensor - L1
Quiz
•
6th Grade - University
10 questions
Informatika2
Quiz
•
11th Grade
10 questions
Logical Reasoning & Learning to Code
Quiz
•
11th Grade
11 questions
G 10- Understanding Main Memory and Cache
Quiz
•
10th Grade - University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Information Technology (IT)
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
15 questions
Main Idea and Supporting Details.
Quiz
•
4th - 11th Grade
12 questions
Add and Subtract Polynomials
Quiz
•
9th - 12th Grade
13 questions
Model Exponential Growth and Decay Scenarios
Quiz
•
9th - 12th Grade
27 questions
7.2.3 Quadrilateral Properties
Quiz
•
9th - 12th Grade
7 questions
Amoeba Sisters Dihybrid Cross Punnett Square
Interactive video
•
9th - 12th Grade
10 questions
The Holocaust: Historical Overview
Interactive video
•
9th - 12th Grade
10 questions
Key Features of Quadratic Functions
Interactive video
•
8th - 12th Grade
